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
e2b78a68
Commit
e2b78a68
authored
Jan 08, 2018
by
姜敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
18295c54
011e8c43
Changes
95
Hide whitespace changes
Inline
Side-by-side
Showing
95 changed files
with
4681 additions
and
247 deletions
+4681
-247
.idea/dictionaries/Eurus.xml
.idea/dictionaries/Eurus.xml
+1
-0
app/build.gradle
app/build.gradle
+1
-1
app/libs/zx_print_library-debug.aar
app/libs/zx_print_library-debug.aar
+0
-0
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-0
app/src/main/java/com/xingdata/zzdpos/base/BaseDialog.java
app/src/main/java/com/xingdata/zzdpos/base/BaseDialog.java
+1
-2
app/src/main/java/com/xingdata/zzdpos/db/DBFactory.java
app/src/main/java/com/xingdata/zzdpos/db/DBFactory.java
+9
-0
app/src/main/java/com/xingdata/zzdpos/model/Saledetail.java
app/src/main/java/com/xingdata/zzdpos/model/Saledetail.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/model/Saleorder.java
app/src/main/java/com/xingdata/zzdpos/model/Saleorder.java
+2
-2
app/src/main/java/com/xingdata/zzdpos/model/Ticket.java
app/src/main/java/com/xingdata/zzdpos/model/Ticket.java
+15
-1
app/src/main/java/com/xingdata/zzdpos/model/VipRechargeOrder.java
...main/java/com/xingdata/zzdpos/model/VipRechargeOrder.java
+15
-1
app/src/main/java/com/xingdata/zzdpos/ui/main/MainActivity.java
...c/main/java/com/xingdata/zzdpos/ui/main/MainActivity.java
+2
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/manageMenu/ManageMenuActivity.java
...gdata/zzdpos/ui/manage/manageMenu/ManageMenuActivity.java
+7
-9
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/ReplenishmentActivity.java
...zzdpos/ui/manage/replenishment/ReplenishmentActivity.java
+87
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/ReplenishmentContract.java
...zzdpos/ui/manage/replenishment/ReplenishmentContract.java
+104
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/ReplenishmentPresenter.java
...zdpos/ui/manage/replenishment/ReplenishmentPresenter.java
+147
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/adpter/ReplenishmentAdapter.java
.../ui/manage/replenishment/adpter/ReplenishmentAdapter.java
+56
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/adpter/ReplenishmentDetailAdapter.java
...nage/replenishment/adpter/ReplenishmentDetailAdapter.java
+123
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentDetailFragment.java
...e/replenishment/fragment/ReplenishmentDetailFragment.java
+265
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentFragment.java
.../manage/replenishment/fragment/ReplenishmentFragment.java
+154
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentListFragment.java
...age/replenishment/fragment/ReplenishmentListFragment.java
+139
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/MsActivity.java
.../java/com/xingdata/zzdpos/ui/marketing/ms/MsActivity.java
+31
-2
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/MsContract.java
.../java/com/xingdata/zzdpos/ui/marketing/ms/MsContract.java
+43
-2
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/MsPresenter.java
...java/com/xingdata/zzdpos/ui/marketing/ms/MsPresenter.java
+49
-2
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/adapter/BeanAdapter.java
.../xingdata/zzdpos/ui/marketing/ms/adapter/BeanAdapter.java
+37
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/adapter/TypeAdapter.java
.../xingdata/zzdpos/ui/marketing/ms/adapter/TypeAdapter.java
+7
-8
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/fragment/AddFragment.java
...xingdata/zzdpos/ui/marketing/ms/fragment/AddFragment.java
+16
-11
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/fragment/EditorFragment.java
...gdata/zzdpos/ui/marketing/ms/fragment/EditorFragment.java
+322
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/Area.java
.../java/com/xingdata/zzdpos/ui/marketing/ms/model/Area.java
+8
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/BaseBean.java
...a/com/xingdata/zzdpos/ui/marketing/ms/model/BaseBean.java
+23
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/Group.java
...java/com/xingdata/zzdpos/ui/marketing/ms/model/Group.java
+8
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/Type.java
.../java/com/xingdata/zzdpos/ui/marketing/ms/model/Type.java
+7
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/User.java
.../java/com/xingdata/zzdpos/ui/marketing/ms/model/User.java
+19
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/BaseGroupView.java
...m/xingdata/zzdpos/ui/marketing/ms/view/BaseGroupView.java
+46
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/GroupAllView.java
...om/xingdata/zzdpos/ui/marketing/ms/view/GroupAllView.java
+29
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/GroupCateView.java
...m/xingdata/zzdpos/ui/marketing/ms/view/GroupCateView.java
+186
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/GroupSkuView.java
...om/xingdata/zzdpos/ui/marketing/ms/view/GroupSkuView.java
+66
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
...n/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
+6
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/fragment/SettleFragment.java
...om/xingdata/zzdpos/ui/settle/fragment/SettleFragment.java
+12
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailActivity.java
...ngdata/zzdpos/ui/statistics/StatisticsDetailActivity.java
+21
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsPresenter.java
...om/xingdata/zzdpos/ui/statistics/StatisticsPresenter.java
+3
-3
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsGroupAdapter.java
.../zzdpos/ui/statistics/adapter/StatisticsGroupAdapter.java
+0
-32
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsOrderGroupAdapter.java
...os/ui/statistics/adapter/StatisticsOrderGroupAdapter.java
+81
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsRechargeGroupAdapter.java
...ui/statistics/adapter/StatisticsRechargeGroupAdapter.java
+45
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsTicketGroupAdapter.java
...s/ui/statistics/adapter/StatisticsTicketGroupAdapter.java
+42
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/StatisticsTitleFragment.java
...zdpos/ui/statistics/fragment/StatisticsTitleFragment.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/MsMainFragment.java
...data/zzdpos/ui/statistics/fragment/ms/MsMainFragment.java
+70
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/RechargeListFragment.java
...zdpos/ui/statistics/fragment/ms/RechargeListFragment.java
+68
-17
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/UsedTicketListFragment.java
...pos/ui/statistics/fragment/ms/UsedTicketListFragment.java
+61
-19
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderListFragment.java
...zdpos/ui/statistics/fragment/order/OrderListFragment.java
+63
-19
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
...main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
+2
-2
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
...ain/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
+5
-4
app/src/main/java/com/xingdata/zzdpos/ui/store/adapter/SkuAdapter.java
...java/com/xingdata/zzdpos/ui/store/adapter/SkuAdapter.java
+2
-11
app/src/main/java/com/xingdata/zzdpos/ui/store/adapter/SkugrpAdapter.java
...a/com/xingdata/zzdpos/ui/store/adapter/SkugrpAdapter.java
+4
-4
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
...com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
+3
-3
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
.../com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
+109
-5
app/src/main/java/com/xingdata/zzdpos/util/StringUtil.java
app/src/main/java/com/xingdata/zzdpos/util/StringUtil.java
+1
-0
app/src/main/res/drawable/shape_gray_round_rectangle_stroke.xml
...c/main/res/drawable/shape_gray_round_rectangle_stroke.xml
+1
-1
app/src/main/res/layout/activity_replenishment.xml
app/src/main/res/layout/activity_replenishment.xml
+25
-0
app/src/main/res/layout/activity_statistics_detail.xml
app/src/main/res/layout/activity_statistics_detail.xml
+1
-1
app/src/main/res/layout/dialog_integral_get_setting.xml
app/src/main/res/layout/dialog_integral_get_setting.xml
+18
-13
app/src/main/res/layout/fragment_casher.xml
app/src/main/res/layout/fragment_casher.xml
+2
-0
app/src/main/res/layout/fragment_ms_editor.xml
app/src/main/res/layout/fragment_ms_editor.xml
+335
-4
app/src/main/res/layout/fragment_ms_list.xml
app/src/main/res/layout/fragment_ms_list.xml
+0
-1
app/src/main/res/layout/fragment_ms_main.xml
app/src/main/res/layout/fragment_ms_main.xml
+2
-1
app/src/main/res/layout/fragment_myself.xml
app/src/main/res/layout/fragment_myself.xml
+3
-3
app/src/main/res/layout/fragment_order_list.xml
app/src/main/res/layout/fragment_order_list.xml
+27
-27
app/src/main/res/layout/fragment_pay_result.xml
app/src/main/res/layout/fragment_pay_result.xml
+6
-2
app/src/main/res/layout/fragment_replenishement.xml
app/src/main/res/layout/fragment_replenishement.xml
+75
-0
app/src/main/res/layout/fragment_replenishement_detail.xml
app/src/main/res/layout/fragment_replenishement_detail.xml
+579
-0
app/src/main/res/layout/fragment_replenishment_list.xml
app/src/main/res/layout/fragment_replenishment_list.xml
+52
-0
app/src/main/res/layout/fragment_service.xml
app/src/main/res/layout/fragment_service.xml
+1
-1
app/src/main/res/layout/fragment_store.xml
app/src/main/res/layout/fragment_store.xml
+17
-9
app/src/main/res/layout/item_marketing_menu.xml
app/src/main/res/layout/item_marketing_menu.xml
+1
-1
app/src/main/res/layout/item_menu_detail.xml
app/src/main/res/layout/item_menu_detail.xml
+2
-1
app/src/main/res/layout/item_replenishment.xml
app/src/main/res/layout/item_replenishment.xml
+289
-0
app/src/main/res/layout/item_replenishment_detail.xml
app/src/main/res/layout/item_replenishment_detail.xml
+227
-0
app/src/main/res/layout/item_return_ticket.xml
app/src/main/res/layout/item_return_ticket.xml
+2
-2
app/src/main/res/layout/item_selector.xml
app/src/main/res/layout/item_selector.xml
+0
-0
app/src/main/res/layout/item_statistics.xml
app/src/main/res/layout/item_statistics.xml
+5
-2
app/src/main/res/layout/item_store_sku.xml
app/src/main/res/layout/item_store_sku.xml
+0
-1
app/src/main/res/layout/item_string.xml
app/src/main/res/layout/item_string.xml
+1
-1
app/src/main/res/layout/item_string_head.xml
app/src/main/res/layout/item_string_head.xml
+23
-0
app/src/main/res/layout/title.xml
app/src/main/res/layout/title.xml
+1
-1
app/src/main/res/layout/title_appback.xml
app/src/main/res/layout/title_appback.xml
+1
-1
app/src/main/res/layout/title_order.xml
app/src/main/res/layout/title_order.xml
+3
-1
app/src/main/res/layout/view_group_all.xml
app/src/main/res/layout/view_group_all.xml
+19
-0
app/src/main/res/layout/view_group_cate.xml
app/src/main/res/layout/view_group_cate.xml
+57
-0
app/src/main/res/layout/view_group_sku.xml
app/src/main/res/layout/view_group_sku.xml
+85
-0
app/src/main/res/layout/view_time_detail.xml
app/src/main/res/layout/view_time_detail.xml
+161
-0
app/src/main/res/mipmap-xhdpi/icon_address.png
app/src/main/res/mipmap-xhdpi/icon_address.png
+0
-0
app/src/main/res/mipmap-xhdpi/icon_dates_green.png
app/src/main/res/mipmap-xhdpi/icon_dates_green.png
+0
-0
app/src/main/res/mipmap-xhdpi/icon_no_green.png
app/src/main/res/mipmap-xhdpi/icon_no_green.png
+0
-0
app/src/main/res/mipmap-xhdpi/icon_stores.png
app/src/main/res/mipmap-xhdpi/icon_stores.png
+0
-0
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+10
-3
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+24
-6
No files found.
.idea/dictionaries/Eurus.xml
View file @
e2b78a68
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<w>
shixiu
</w>
<w>
shixiu
</w>
<w>
skugrps
</w>
<w>
skugrps
</w>
<w>
skus
</w>
<w>
skus
</w>
<w>
strs
</w>
<w>
sunquan
</w>
<w>
sunquan
</w>
<w>
xishi
</w>
<w>
xishi
</w>
<w>
yanqing
</w>
<w>
yanqing
</w>
...
...
app/build.gradle
View file @
e2b78a68
...
@@ -10,6 +10,7 @@ android {
...
@@ -10,6 +10,7 @@ android {
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
}
}
//解决问题的代码
//解决问题的代码
dexOptions
{
dexOptions
{
...
@@ -80,6 +81,5 @@ dependencies {
...
@@ -80,6 +81,5 @@ dependencies {
compile
'com.github.ybq:Android-SpinKit:1.1.0'
compile
'com.github.ybq:Android-SpinKit:1.1.0'
compile
'com.youth.banner:banner:1.4.10'
compile
'com.youth.banner:banner:1.4.10'
compile
'cn.jzvd:jiaozivideoplayer:6.0.0'
compile
'cn.jzvd:jiaozivideoplayer:6.0.0'
compile
'com.liulishuo.filedownloader:library:1.6.8'
compile
(
name:
'zx_print_library-debug'
,
ext:
'aar'
)
compile
(
name:
'zx_print_library-debug'
,
ext:
'aar'
)
}
}
app/libs/zx_print_library-debug.aar
View file @
e2b78a68
No preview for this file type
app/src/main/AndroidManifest.xml
View file @
e2b78a68
...
@@ -92,6 +92,7 @@
...
@@ -92,6 +92,7 @@
android:name=
".ui.manage.manageMenu.ManageMenuActivity"
android:name=
".ui.manage.manageMenu.ManageMenuActivity"
android:configChanges=
"keyboard|orientation|screenSize|keyboardHidden"
android:configChanges=
"keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode=
"adjustUnspecified|stateHidden"
/>
android:windowSoftInputMode=
"adjustUnspecified|stateHidden"
/>
<activity
android:name=
".ui.manage.replenishment.ReplenishmentActivity"
></activity>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/base/BaseDialog.java
View file @
e2b78a68
...
@@ -101,8 +101,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
...
@@ -101,8 +101,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
mBaseBinding
=
DataBindingUtil
.
inflate
(
inflater
,
R
.
layout
.
dialog_base
,
container
,
false
);
mBaseBinding
=
DataBindingUtil
.
inflate
(
inflater
,
R
.
layout
.
dialog_base
,
container
,
false
);
mBaseBinding
.
vsCenter
.
getViewStub
().
setLayoutResource
(
getLayoutId
());
mBaseBinding
.
vsCenter
.
getViewStub
().
setLayoutResource
(
getLayoutId
());
mBaseBinding
.
vsCenter
.
getViewStub
().
setOnInflateListener
((
viewStub
,
view
)
->
mViewBinding
mBaseBinding
.
vsCenter
.
getViewStub
().
setOnInflateListener
((
viewStub
,
view
)
->
mViewBinding
=
DataBindingUtil
.
bind
(
view
));
=
DataBindingUtil
.
bind
(
view
));
mBaseBinding
.
vsCenter
.
getViewStub
().
inflate
();
mBaseBinding
.
vsCenter
.
getViewStub
().
inflate
();
if
(!
isShowTitle
()
||
getTitle
()
<
0
)
mBaseBinding
.
tvTitle
.
setVisibility
(
View
.
GONE
);
if
(!
isShowTitle
()
||
getTitle
()
<
0
)
mBaseBinding
.
tvTitle
.
setVisibility
(
View
.
GONE
);
...
...
app/src/main/java/com/xingdata/zzdpos/db/DBFactory.java
View file @
e2b78a68
...
@@ -7,6 +7,7 @@ import com.xingdata.zzdpos.App;
...
@@ -7,6 +7,7 @@ import com.xingdata.zzdpos.App;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.base.BaseModel
;
import
com.xingdata.zzdpos.base.BaseModel
;
import
com.xingdata.zzdpos.model.HandoverInfo
;
import
com.xingdata.zzdpos.model.HandoverInfo
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Pay
;
import
com.xingdata.zzdpos.model.Pay
;
import
com.xingdata.zzdpos.model.Sskugrp
;
import
com.xingdata.zzdpos.model.Sskugrp
;
...
@@ -207,6 +208,14 @@ public class DBFactory {
...
@@ -207,6 +208,14 @@ public class DBFactory {
}
}
}
}
public
static
class
Marketing
{
public
static
class
Ms
{
public
static
Observable
<
List
<
Level
>>
queryLevel
()
{
return
Observable
.
just
(
DB
.
getInstance
().
get
(
MainPresenter
.
class
).
where
(
Level
.
class
).
findAll
())
.
flatMap
(
levels
->
Observable
.
just
(
getList
(
levels
)));
}
}
}
public
static
<
E
extends
RealmModel
>
List
<
E
>
getLimitList
(
RealmResults
<
E
>
data
,
int
offset
,
int
limit
)
{
public
static
<
E
extends
RealmModel
>
List
<
E
>
getLimitList
(
RealmResults
<
E
>
data
,
int
offset
,
int
limit
)
{
List
<
E
>
obtainList
=
new
ArrayList
<>();
List
<
E
>
obtainList
=
new
ArrayList
<>();
...
...
app/src/main/java/com/xingdata/zzdpos/model/Saledetail.java
View file @
e2b78a68
...
@@ -58,7 +58,7 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint {
...
@@ -58,7 +58,7 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint {
@Override
@Override
public
String
getPrice
()
{
public
String
getPrice
()
{
return
ConvertUtil
.
fenToYuan
(
skuPrice
,
false
);
return
ConvertUtil
.
fenToYuan
(
skuPrice
Pay
,
false
);
}
}
@Override
@Override
...
...
app/src/main/java/com/xingdata/zzdpos/model/Saleorder.java
View file @
e2b78a68
...
@@ -977,7 +977,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
...
@@ -977,7 +977,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
@Override
@Override
public
String
getGoodsAmtSum
()
{
public
String
getGoodsAmtSum
()
{
return
ConvertUtil
.
fenToYuan
(
order
Auth
Amt
,
true
);
return
ConvertUtil
.
fenToYuan
(
order
Pay
Amt
,
true
);
}
}
@Override
@Override
...
@@ -987,7 +987,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
...
@@ -987,7 +987,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
@Override
@Override
public
String
getGoodsReduAmt
()
{
public
String
getGoodsReduAmt
()
{
return
null
;
return
ConvertUtil
.
fenToYuan
(
orderReduAmt
,
true
)
;
}
}
@Override
@Override
...
...
app/src/main/java/com/xingdata/zzdpos/model/Ticket.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
model
;
package
com
.
xingdata
.
zzdpos
.
model
;
import
android.provider.MediaStore
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
java.util.Date
;
import
java.util.Date
;
public
class
Ticket
implements
BaseBean
{
public
class
Ticket
extends
SectionEntity
<
MediaStore
.
Video
>
implements
BaseBean
{
private
boolean
isSelected
;
private
boolean
isSelected
;
...
@@ -16,9 +19,19 @@ public class Ticket implements BaseBean {
...
@@ -16,9 +19,19 @@ public class Ticket implements BaseBean {
isSelected
=
selected
;
isSelected
=
selected
;
}
}
public
Ticket
(
boolean
isHeader
,
String
header
)
{
super
(
isHeader
,
header
);
}
public
Ticket
(
MediaStore
.
Video
video
)
{
super
(
video
);
}
public
Ticket
()
{
public
Ticket
()
{
super
(
false
,
""
);
}
}
/**
/**
* 创建默认优惠卷(无优惠)
* 创建默认优惠卷(无优惠)
*
*
...
@@ -32,6 +45,7 @@ public class Ticket implements BaseBean {
...
@@ -32,6 +45,7 @@ public class Ticket implements BaseBean {
@Deprecated
@Deprecated
public
Ticket
(
Long
l
)
{
public
Ticket
(
Long
l
)
{
super
(
false
,
""
);
this
.
id
=
l
;
this
.
id
=
l
;
this
.
ticketNo
=
l
;
this
.
ticketNo
=
l
;
this
.
ticketValAmt
=
0L
;
this
.
ticketValAmt
=
0L
;
...
...
app/src/main/java/com/xingdata/zzdpos/model/VipRechargeOrder.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
model
;
package
com
.
xingdata
.
zzdpos
.
model
;
import
android.provider.MediaStore
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.api.print.entity.BaseGoodPrint
;
import
com.xingdata.api.print.entity.BaseGoodPrint
;
import
com.xingdata.api.print.entity.BaseOrderPrint
;
import
com.xingdata.api.print.entity.BaseOrderPrint
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
com.xingdata.zzdpos.base.BaseBean
;
...
@@ -12,7 +15,7 @@ import java.util.List;
...
@@ -12,7 +15,7 @@ import java.util.List;
* Created by Administrator on 2017/12/15.
* Created by Administrator on 2017/12/15.
*/
*/
public
class
VipRechargeOrder
implements
BaseOrderPrint
,
BaseBean
{
public
class
VipRechargeOrder
extends
SectionEntity
<
MediaStore
.
Video
>
implements
BaseOrderPrint
,
BaseBean
{
private
Long
cardAmtPay
;
private
Long
cardAmtPay
;
private
Long
cardAmtSend
;
private
Long
cardAmtSend
;
private
String
orderNo
;
private
String
orderNo
;
...
@@ -23,6 +26,17 @@ public class VipRechargeOrder implements BaseOrderPrint, BaseBean {
...
@@ -23,6 +26,17 @@ public class VipRechargeOrder implements BaseOrderPrint, BaseBean {
private
String
vipMobile
;
private
String
vipMobile
;
private
Long
createTime
;
private
Long
createTime
;
public
VipRechargeOrder
(
boolean
isHeader
,
String
header
)
{
super
(
isHeader
,
header
);
}
public
VipRechargeOrder
(
MediaStore
.
Video
video
)
{
super
(
video
);
}
public
VipRechargeOrder
()
{
super
(
false
,
""
);
}
public
Long
getCreateTime
()
{
public
Long
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/main/MainActivity.java
View file @
e2b78a68
...
@@ -34,6 +34,7 @@ import io.reactivex.schedulers.Schedulers;
...
@@ -34,6 +34,7 @@ import io.reactivex.schedulers.Schedulers;
public
class
MainActivity
extends
BaseActivity
<
MainPresenter
,
ActivityMainBinding
>
implements
MainContract
.
View
{
public
class
MainActivity
extends
BaseActivity
<
MainPresenter
,
ActivityMainBinding
>
implements
MainContract
.
View
{
public
static
MainActivity
mainActivity
;
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
.
mipmap
.
icon_menu_myself_0
};
private
int
[]
iconList
=
{
R
.
mipmap
.
icon_menu_cashier_1
,
R
.
mipmap
.
icon_menu_service_0
,
R
.
mipmap
.
icon_menu_myself_0
};
private
FragmentViewAdapter
mFragmentPagerAdapter
;
private
FragmentViewAdapter
mFragmentPagerAdapter
;
...
@@ -48,6 +49,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -48,6 +49,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mainActivity
=
this
;
mPresenter
.
initHandoverInfo
();
mPresenter
.
initHandoverInfo
();
List
<
BaseFragment
>
fragments
=
new
ArrayList
<>();
List
<
BaseFragment
>
fragments
=
new
ArrayList
<>();
fragments
.
add
(
new
CasherFragment
());
fragments
.
add
(
new
CasherFragment
());
...
...
app/src/main/java/com/xingdata/zzdpos/ui/manage/manageMenu/ManageMenuActivity.java
View file @
e2b78a68
...
@@ -11,6 +11,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
...
@@ -11,6 +11,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding
;
import
com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding
;
import
com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity
;
import
com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity
;
import
com.xingdata.zzdpos.ui.marketing.marketingMenu.adapter.MarketingMenuAdapter
;
import
com.xingdata.zzdpos.ui.marketing.marketingMenu.adapter.MarketingMenuAdapter
;
...
@@ -57,30 +58,27 @@ public class ManageMenuActivity extends AppCompatActivity {
...
@@ -57,30 +58,27 @@ public class ManageMenuActivity extends AppCompatActivity {
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
marketingMenuAdapter
.
getData
().
get
(
position
))
{
switch
(
marketingMenuAdapter
.
getData
().
get
(
position
))
{
case
C
.
MENU
.
MENU_MANAGER_OPER
:
{
case
C
.
MENU
.
MENU_MANAGER_OPER
:
{
//会员等级
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_GOODS
:
{
case
C
.
MENU
.
MENU_MANAGER_GOODS
:
{
//积分规则
ActivityUtils
.
startActivity
(
IntegralActivity
.
class
);
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_BALE
:
{
case
C
.
MENU
.
MENU_MANAGER_BALE
:
{
//优惠券设置
ActivityUtils
.
startActivity
(
ReturnTicketActivity
.
class
);
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_REPLENISHMENT
:
{
case
C
.
MENU
.
MENU_MANAGER_REPLENISHMENT
:
{
//充值优惠
ActivityUtils
.
startActivity
(
ManageMenuActivity
.
this
,
ReplenishmentActivity
.
class
);
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_OTHER
:
{
case
C
.
MENU
.
MENU_MANAGER_OTHER
:
{
//营销计划
ActivityUtils
.
startActivity
(
MsActivity
.
class
);
}
}
break
;
break
;
case
C
.
MENU
.
MENU_MANAGER_INVENTORY
:
{
case
C
.
MENU
.
MENU_MANAGER_INVENTORY
:
{
//群发短信
}
}
break
;
break
;
default
:
{
default
:
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/ReplenishmentActivity.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
manage
.
replenishment
;
import
com.blankj.utilcode.util.KeyboardUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.databinding.ActivityReplenishmentBinding
;
import
com.xingdata.zzdpos.model.Psb
;
import
com.xingdata.zzdpos.model.Sssku
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentFragment
;
import
java.util.List
;
public
class
ReplenishmentActivity
extends
BaseActivity
<
ReplenishmentPresenter
,
ActivityReplenishmentBinding
>
implements
ReplenishmentContract
.
View
{
private
ReplenishmentFragment
mReplenishmentFragment
=
new
ReplenishmentFragment
();
// private ReplenishmentDetailFragment mReplenishmentDetailFragment = new ReplenishmentDetailFragment();
private
boolean
isAllowFragment
=
true
;
LoadingDialog
mLoadingDialog
=
new
LoadingDialog
();
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_replenishment
;
}
@Override
public
void
initView
()
{
loadRootFragment
(
R
.
id
.
f_bottom
,
mReplenishmentFragment
,
true
,
false
);
}
@Override
public
void
addPsbSuc
()
{
// mReplenishmentDetailFragment.pop();
mPresenter
.
refreshPsb
();
}
@Override
public
void
showReplenishmentList
(
List
<
Psb
>
A
,
List
<
Psb
>
B
,
List
<
Psb
>
C
)
{
mReplenishmentFragment
.
showReplenishmentList
(
A
,
B
,
C
);
}
@Override
public
void
openReplenishmentDetailFragment
(
List
<
Sssku
>
ssskuList
)
{
// if (isAllowFragment) {
// isAllowFragment = false;
// mReplenishmentDetailFragment.setSsskuList(ssskuList);
// start(mReplenishmentDetailFragment);
// }
}
@Override
public
void
openReplenishmentDetailFragment
(
Psb
psb
)
{
// if (isAllowFragment) {
// isAllowFragment = false;
// mReplenishmentDetailFragment.setPsb(psb);
// start(mReplenishmentDetailFragment);
//
// }
}
@Override
protected
void
onPause
()
{
KeyboardUtils
.
hideSoftInput
(
this
);
super
.
onPause
();
}
@Override
public
void
isShowLoading
(
Boolean
is
)
{
if
(
is
)
{
mLoadingDialog
.
show
((
BaseActivity
)
mContext
);
}
else
{
if
(
mLoadingDialog
.
isShowing
)
{
mLoadingDialog
.
dismiss
();
}
}
}
@Override
public
void
isAllowFragment
(
Boolean
is
)
{
isAllowFragment
=
is
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/ReplenishmentContract.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
manage
.
replenishment
;
import
com.xingdata.zzdpos.base.BasePresenter
;
import
com.xingdata.zzdpos.base.BaseView
;
import
com.xingdata.zzdpos.model.Psb
;
import
com.xingdata.zzdpos.model.Sssku
;
import
com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentListFragment
;
import
java.util.List
;
/**
* Created by Eurus on 2017/11/23.
*/
public
interface
ReplenishmentContract
{
interface
View
extends
BaseView
{
void
isShowLoading
(
Boolean
is
);
void
isAllowFragment
(
Boolean
is
);
/**
* 提交订货成功
*/
void
addPsbSuc
();
/**
* 展示待确认的订单
*/
void
showReplenishmentList
(
List
<
Psb
>
A
,
List
<
Psb
>
B
,
List
<
Psb
>
C
);
/**
* 跳转订货详情
*/
void
openReplenishmentDetailFragment
(
List
<
Sssku
>
ssskuList
);
/**
* 跳转订货详情
*/
void
openReplenishmentDetailFragment
(
Psb
psb
);
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
/**
* 补货订货页面 - 点击一键补货
*/
public
abstract
void
clickAdd
();
/**
* 补货订货页面 - 查询门店订货订单
*/
public
abstract
void
queryPsbList
();
/**
* 补货订货页面 - 查询门店订货订单
*/
public
abstract
void
searchPsbList
(
String
wd
,
ReplenishmentListFragment
replenishmentListFragment
);
/**
* 补货订货页面 - 查询门店订货详情
*/
public
abstract
void
queryPsbDetail
(
Psb
psb
);
/**
* 补货订货详情页面 - 点击订货提交
*/
public
abstract
void
clickReplenishmentSubmit
(
Psb
psb
);
/**
* 补货订货详情页面 - 点击订货修改
*/
public
abstract
void
clickReplenishmentUpdate
(
Psb
psb
);
/**
* 补货订货详情页面 - 点击确定收货
*/
public
abstract
void
clickReplenishmentConfirm
(
String
psbNo
);
/**
* 补货订货页面 - 刷新
*/
public
abstract
void
refreshPsb
();
/**
* 补货订货页面 - 更改Fragment跳转安全
*/
public
abstract
void
isAllowFragment
(
Boolean
is
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/ReplenishmentPresenter.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
manage
.
replenishment
;
import
android.util.Log
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.model.Psb
;
import
com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentListFragment
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
ReplenishmentPresenter
extends
ReplenishmentContract
.
Presenter
{
private
List
<
Psb
>
unConfirmedPsbList
=
new
ArrayList
<>();
private
List
<
Psb
>
unReceivePsbList
=
new
ArrayList
<>();
private
List
<
Psb
>
finishedPsbList
=
new
ArrayList
<>();
@Override
public
void
onAttached
()
{
}
@Override
public
void
clickAdd
()
{
mView
.
isShowLoading
(
true
);
ApiFactory
.
Psb
.
preOrder
().
doFinally
(()
->
{
mView
.
isShowLoading
(
false
);
})
.
subscribe
(
ssskuPager
->
{
mView
.
openReplenishmentDetailFragment
(
ssskuPager
.
getList
());
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
queryPsbList
()
{
unConfirmedPsbList
.
clear
();
unReceivePsbList
.
clear
();
finishedPsbList
.
clear
();
ApiFactory
.
Psb
.
queryPsb
(
1
,
200
).
doFinally
(()
->
{
})
.
subscribe
(
psbPager
->
{
for
(
Psb
psb
:
psbPager
.
getList
())
{
switch
(
psb
.
getPsbStatus
())
{
case
3
:
unConfirmedPsbList
.
add
(
psb
);
break
;
case
1
:
unReceivePsbList
.
add
(
psb
);
break
;
case
0
:
finishedPsbList
.
add
(
psb
);
break
;
}
}
mView
.
showReplenishmentList
(
unConfirmedPsbList
,
unReceivePsbList
,
finishedPsbList
);
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
searchPsbList
(
String
wd
,
ReplenishmentListFragment
replenishmentListFragment
)
{
replenishmentListFragment
.
searchSucc
(
wd
);
}
@Override
public
void
queryPsbDetail
(
Psb
psb
)
{
mView
.
isShowLoading
(
true
);
ApiFactory
.
Psb
.
queryPsbDetail
(
psb
.
getPsbNo
(),
psb
.
getId
()).
doFinally
(()
->
{
mView
.
isShowLoading
(
false
);
})
.
subscribe
(
psbNew
->
{
// psbNew.setOutChannelNameabcn(psb.getOutChannelNameabcn());
// psbNew.setCityAddress(psb.getCityAddress());
// psbNew.setCityProvName(psb.getCityProvName());
// psbNew.setCityName(psb.getCityName());
// psbNew.setCityCountyName(psb.getCityCountyName());
mView
.
openReplenishmentDetailFragment
(
psbNew
);
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
clickReplenishmentSubmit
(
Psb
psb
)
{
mView
.
isShowLoading
(
true
);
String
s
=
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
(
psb
);
ApiFactory
.
Psb
.
addPsb
(
psb
).
doFinally
(()
->
{
mView
.
isShowLoading
(
false
);
})
.
subscribe
(
psb1
->
{
mView
.
addPsbSuc
();
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
clickReplenishmentUpdate
(
Psb
psb
)
{
ApiFactory
.
Psb
.
updatePsb
(
psb
).
doFinally
(()
->
{
})
.
subscribe
(
object
->
{
mView
.
addPsbSuc
();
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
clickReplenishmentConfirm
(
String
psbNo
)
{
ApiFactory
.
Psb
.
confirmRPsb
(
psbNo
).
doFinally
(()
->
{
})
.
subscribe
(
object
->
{
mView
.
addPsbSuc
();
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
refreshPsb
()
{
queryPsbList
();
Log
.
e
(
"r"
,
"isrefreshp"
);
}
@Override
public
void
isAllowFragment
(
Boolean
is
)
{
mView
.
isAllowFragment
(
is
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/adpter/ReplenishmentAdapter.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
manage
.
replenishment
.
adpter
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemReplenishmentBinding
;
import
com.xingdata.zzdpos.model.Psb
;
import
com.xingdata.zzdpos.ui.login.LoginPresenter
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
java.util.List
;
public
class
ReplenishmentAdapter
extends
BaseAdapter
<
Psb
,
ItemReplenishmentBinding
>
{
public
ReplenishmentAdapter
(
@Nullable
List
<
Psb
>
data
)
{
super
(
R
.
layout
.
item_replenishment
,
data
);
}
@Override
protected
void
convert
(
ItemReplenishmentBinding
mViewBinding
,
Psb
item
)
{
mViewBinding
.
setAmt
(
ConvertUtil
.
fenToYuan
(
item
.
getPsbAmt
()));
mViewBinding
.
setDate
(
com
.
blankj
.
utilcode
.
util
.
TimeUtils
.
millis2String
(
item
.
getCreateTime
()));
mViewBinding
.
setNo
(
item
.
getPsbNo
());
mViewBinding
.
setNum
(
item
.
getPsbCnt
()
+
""
);
mViewBinding
.
setShopName
(
LoginPresenter
.
loginReturnBean
.
getShopNameAbcn
());
switch
(
item
.
getPsbStatus
())
{
case
3
:
mViewBinding
.
setStatus
(
"待确认"
);
break
;
case
1
:
mViewBinding
.
setStatus
(
"待收货"
);
break
;
case
0
:
mViewBinding
.
setStatus
(
"已入库"
);
break
;
}
mViewBinding
.
setSupplierName
(
item
.
getOutChannelNameabcn
());
mViewBinding
.
setSupplierAddress
(
item
.
getOutCityProvName
()
+
item
.
getOutCityName
()
+
item
.
getOutCityCountyName
()
+
item
.
getOutCityAddress
());
}
@Override
protected
View
getItemView
(
int
layoutResId
,
ViewGroup
parent
)
{
return
super
.
getItemView
(
layoutResId
,
parent
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/adpter/ReplenishmentDetailAdapter.java
0 → 100644
View file @
e2b78a68
//package com.xingdata.zzdpos.ui.manage.replenishment.adpter;
//
//
//import android.support.annotation.Nullable;
//import android.support.v4.content.ContextCompat;
//import android.text.Editable;
//import android.text.TextWatcher;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.EditText;
//
//
//import com.xingdata.zzdpos.R;
//import com.xingdata.zzdpos.model.Sssku;
//import com.xingdata.zzdpos.util.ConvertUtil;
//
//import java.util.List;
//
//public class ReplenishmentDetailAdapter extends BaseAdapter<Sssku, ItemReplenishmentDetailBinding> {
// private Boolean isTouch = true;
// private UpdatePriceListener mUpdatePriceListener;
//
// public ReplenishmentDetailAdapter(@Nullable List<Sssku> data, boolean Touch) {
// super(R.layout.item_replenishment_detail, data);
// isTouch = Touch;
//
// }
//
//
// @Override
// protected void convert(ItemReplenishmentDetailBinding mViewBinding, Sssku item) {
// mViewBinding.imgGoods.setImageURI(item.getSpuImg());
// mViewBinding.tvGoodsName.setText(item.getSpuName());
// mViewBinding.tvGoodsCode.setText(item.getSpuBarcode() + "");
// mViewBinding.tvGoodsSize.setText("规格/" + item.getSpuUnitName());
// mViewBinding.tvGoodsPrice.setText(ConvertUtil.fenToYuan(item.getSkuCost(), false));
// mViewBinding.tvStock.setText(item.getSkuStock() + "");
// if (item.getSkuCnt() != null) {
// mViewBinding.etCount.setText(item.getSkuCnt() + "");
// } else {
// item.setSkuCnt(1);
// }
//
// if (!isTouch) {
// mViewBinding.etCount.setEnabled(false);
// mViewBinding.etCount.setTextColor(ContextCompat.getColor(mContext,R.color.white_cargo));
// mViewBinding.btnDown.setVisibility(View.GONE);
// mViewBinding.btnUp.setVisibility(View.GONE);
// }
// }
//
//
// @Override
// protected void convert(BaseViewHolder helper, Sssku item) {
//
// if (isTouch) {
// helper.getView(R.id.btn_up).setOnClickListener(v -> {
// Integer sellCount = item.getSkuCnt();
// if (sellCount >= 0 && sellCount < 9999) {
// helper.setText(R.id.et_count, String.valueOf(++sellCount));
// item.setSkuCnt(sellCount);
//// mUpdatePriceListener.updatePrice(1L*(item.getSkuCost()));
// }
// });
// helper.getView(R.id.btn_down).setOnClickListener(v -> {
// Integer sellCount = item.getSkuCnt();
// if (sellCount == 1) {
// return;
// }
// if (sellCount > 1 && sellCount <= 9999) {
// helper.setText(R.id.et_count, String.valueOf(--sellCount));
// item.setSkuCnt(sellCount);
//// mUpdatePriceListener.updatePrice(-1L*(item.getSkuCost()));
//
// }
// });
// ((EditText) helper.getView(R.id.et_count)).addTextChangedListener((new TextWatcher() {
//
// @Override
// public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
//
// }
//
// @Override
// public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
// Integer sellCount = ((EditText) helper.getView(R.id.et_count)).getText().toString().length() == 0 ? 1 : Integer.valueOf(((EditText) helper.getView(R.id.et_count)).getText().toString());
// if (sellCount==0){
// sellCount=1;
// helper.setText(R.id.et_count,"");
//
// }
// Integer changedNum = sellCount - item.getSkuCnt();
// item.setSkuCnt(sellCount);
// mUpdatePriceListener.updatePrice(item.getSkuCost() * changedNum);
// }
//
// @Override
// public void afterTextChanged(Editable editable) {
// }
//
//
// }));
// }
// super.convert(helper, item);
// }
//
// @Override
// protected View getItemView(int layoutResId, ViewGroup parent) {
// return super.getItemView(layoutResId, parent);
// }
//
//
// public void setmUpdatePriceListener(UpdatePriceListener updatePriceListener) {
// this.mUpdatePriceListener = updatePriceListener;
// }
//
//
// public abstract static class UpdatePriceListener {
//
// public abstract void updatePrice(long amt);
// }
//
//}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentDetailFragment.java
0 → 100644
View file @
e2b78a68
//package com.xingdata.zzdpos.ui.manage.replenishment.fragment;
//
//
//import android.annotation.SuppressLint;
//import android.graphics.drawable.Drawable;
//import android.support.v7.widget.LinearLayoutManager;
//import android.view.KeyEvent;
//import android.view.View;
//import android.widget.TextView;
//
//import com.blankj.utilcode.util.KeyboardUtils;
//import com.blankj.utilcode.util.TimeUtils;
//import com.blankj.utilcode.util.ToastUtils;
//import com.xingdata.api.print.ZX_PrintPOS;
//import com.xingdata.zzdhd.R;
//import com.xingdata.zzdhd.base.BaseActivity;
//import com.xingdata.zzdhd.base.BaseFragment;
//import com.xingdata.zzdhd.databinding.FragmentReplenishementDetailBinding;
//import com.xingdata.zzdhd.model.Psb;
//import com.xingdata.zzdhd.model.Sssku;
//import com.xingdata.zzdhd.ui.dialog.PromptDialog;
//import com.xingdata.zzdhd.ui.login.LoginPresenter;
//import com.xingdata.zzdhd.ui.manager.replenishment.ReplenishmentPresenter;
//import com.xingdata.zzdhd.ui.manager.replenishment.adpter.ReplenishmentDetailAdapter;
//import com.xingdata.zzdhd.util.ConvertUtil;
//import com.xingdata.zzdhd.util.OnClickListener;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.regex.Matcher;
//import java.util.regex.Pattern;
//
//
///**
// * Created by Administrator on 2017/11/24.
// */
//
//public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPresenter, FragmentReplenishementDetailBinding> {
//
// private ReplenishmentDetailAdapter mReplenishmentDetailAdapter;
// private List<Sssku> ssskuList = new ArrayList<>();
// private Psb mPsb;
// private long sumPrice;
// private boolean isAdd = true;
//
// @Override
// public int getLayoutId() {
// return R.layout.fragment_replenishement_detail;
// }
//
// @Override
// public void initView() {
//
// initRecycycler();
// mViewBinding.btnSearch.setOnClickListener(view -> {
// scrollToItem(mViewBinding.etKeyword.getText().toString().trim());
// });
// mViewBinding.etKeyword.setOnKeyListener((v, keyCode, event) -> {
// if (keyCode == KeyEvent.KEYCODE_ENTER)
// scrollToItem(mViewBinding.etKeyword.getText().toString().trim());
// return false;
// });
// mViewBinding.btnCanel.setOnClickListener(view -> {
// this.pop();
// });
//
// mViewBinding.btnEnd.setOnClickListener(view -> {
// if (mPsb == null || mPsb.getPsbStatus() == null) {
// Psb psb = new Psb();
// psb.setPsbType("0");
// psb.setSsskuList(mReplenishmentDetailAdapter.getData());
// mPresenter.clickReplenishmentSubmit(psb);
// } else {
// switch (mPsb.getPsbStatus()) {
// case 3:
// mPsb.setPsbdetailList(mReplenishmentDetailAdapter.getData());
// mPresenter.clickReplenishmentUpdate(mPsb);
// break;
// case 1:
// mPresenter.clickReplenishmentConfirm(mPsb.getPsbNo());
// break;
// }
// }
// });
// mViewBinding.btnPrint.setOnClickListener(new OnClickListener() {
// @Override
// protected void myOnClickListener(View v) {
// ZX_PrintPOS.getInstance(mContext).printOrder(1, mPsb);
// }
// });
// }
//
// private void initRecycycler() {
// mViewBinding.replenishmentRightRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
// if (mPsb != null && mPsb.getPsbStatus() != null) {
// switch (mPsb.getPsbStatus()) {
// case 3:
// mReplenishmentDetailAdapter = new ReplenishmentDetailAdapter(ssskuList, true);
// break;
// case 1:
// mReplenishmentDetailAdapter = new ReplenishmentDetailAdapter(ssskuList, true);
// break;
// case 0:
// mReplenishmentDetailAdapter = new ReplenishmentDetailAdapter(ssskuList, false);
// break;
// default:
// mReplenishmentDetailAdapter = new ReplenishmentDetailAdapter(ssskuList, true);
// break;
// }
// } else {
// mReplenishmentDetailAdapter = new ReplenishmentDetailAdapter(ssskuList, true);
// }
// mReplenishmentDetailAdapter.setEmptyView(getEmptyView());
// mViewBinding.replenishmentRightRecycler.setAdapter(mReplenishmentDetailAdapter);
// mReplenishmentDetailAdapter.setOnItemLongClickListener((adapter, view, position) -> {
// PromptDialog delDialog = new PromptDialog();
// delDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "是否删除").setClick(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// mReplenishmentDetailAdapter.getData().remove(position);
// mReplenishmentDetailAdapter.notifyDataSetChanged();
// delDialog.dismiss();
// }
// }, new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// delDialog.dismiss();
// }
// }).setCancelables(false).show((BaseActivity) mContext);
// return false;
// });
// mReplenishmentDetailAdapter.setmUpdatePriceListener(new ReplenishmentDetailAdapter.UpdatePriceListener() {
// @Override
// public void updatePrice(long amt) {
// sumPrice = sumPrice + amt;
// mViewBinding.setFinallyPrice(ConvertUtil.fenToYuan(sumPrice, true));
// }
// });
// initData();
// }
//
// private void initData() {
// if (isAdd) {
// mViewBinding.setIsShowSupplier(false);
// } else {
// mViewBinding.setIsShowSupplier(true);
// mViewBinding.setSupplierName(mPsb.getOutChannelNameabcn());
// mViewBinding.setSupplierAddress(mPsb.getOutCityProvName() + mPsb.getOutCityName() + mPsb.getOutCityCountyName() + mPsb.getOutCityAddress());
// mViewBinding.setSupplierTel(mPsb.getOutContactMob());
// mViewBinding.setDate(TimeUtils.millis2String(mPsb.getCreateTime()));
// mViewBinding.setNo(mPsb.getPsbNo());
// }
// if (this.ssskuList.size() != 0) {
// mViewBinding.setSumNum(ssskuList.size() + "种");
// mViewBinding.setFinallyPrice(ConvertUtil.fenToYuan(getSumPrice(), true));
// } else {
// mViewBinding.setSumNum("0个");
// mViewBinding.setFinallyPrice("¥0.00");
// }
// mViewBinding.setShopOderName(LoginPresenter.loginReturnBean.getOperName());
// mViewBinding.setShopName(LoginPresenter.loginReturnBean.getShopNameAbcn());
// mViewBinding.setShopAddress(LoginPresenter.loginReturnBean.getCityProvName() + LoginPresenter.loginReturnBean.getCityName() + LoginPresenter.loginReturnBean.getCityCountyName() + LoginPresenter.loginReturnBean.getCityAddress());
// mViewBinding.setShopTel(LoginPresenter.loginReturnBean.getContactTel());
//
// if (mPsb != null && mPsb.getPsbStatus() != null) {
// switch (mPsb.getPsbStatus()) {
// case 3:
// mViewBinding.btnEnd.setText("修改订单");
// mViewBinding.btnPrint.setVisibility(View.VISIBLE);
// break;
// case 1:
// mViewBinding.btnEnd.setText("确认收货");
// mViewBinding.btnPrint.setVisibility(View.VISIBLE);
// break;
// case 0:
// mViewBinding.btnEnd.setVisibility(View.GONE);
// mViewBinding.btnPrint.setVisibility(View.VISIBLE);
// break;
// default:
// break;
// }
// }
//
// }
//
// public long getSumPrice() {
// sumPrice = 0;
// for (Sssku sssku : mReplenishmentDetailAdapter.getData()) {
// sumPrice = sumPrice + sssku.getSellSumAmt();
// }
// return sumPrice;
// }
//
//
// public void setSsskuList(List<Sssku> ssskuList) {
// this.ssskuList = ssskuList;
// isAdd = true;
// this.mPsb = null;
// }
//
// public void setPsb(Psb psb) {
// this.mPsb = psb;
// this.ssskuList = psb.getSsskuList();
// isAdd = false;
// }
//
//
// @Override
// public void onDestroy() {
// mPresenter.isAllowFragment(true);
// super.onDestroy();
// }
//
// /**
// * 获取空页面
// *
// *
// * @return 空页面
// */
// protected View getEmptyView() {
// @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
// Drawable drawable=getResources().getDrawable(R.mipmap.bg_no_null);
// drawable.setBounds(0,0,200,200);
//
// TextView textView=((TextView) view.findViewById(R.id.tv_empty));
// textView.setCompoundDrawablesRelative(null,drawable,null,null);
// textView.setText(R.string.replenishment_detail_full);
// textView.setTextColor(getResources().getColor(R.color.black));
// return view;
// }
// private void scrollToItem(String string) {
//
// if (string.length() == 0) {
// ToastUtils.showShort("请输入搜索内容");
// return;
// }
// Pattern pattern = Pattern.compile(string, Pattern.CASE_INSENSITIVE);
//
// for (int i = 0; i < mReplenishmentDetailAdapter.getData().size(); i++) {
// Matcher matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuBarcode() + "");
// if (matcher.find()) {
// ((LinearLayoutManager) mViewBinding.replenishmentRightRecycler.getLayoutManager()).scrollToPositionWithOffset(i, 0);
// ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName());
// KeyboardUtils.hideSoftInput(getActivity());
// return;
// }
// matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuAb() + "");
// if (matcher.find()) {
// ((LinearLayoutManager) mViewBinding.replenishmentRightRecycler.getLayoutManager()).scrollToPositionWithOffset(i, 0);
// ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName());
// KeyboardUtils.hideSoftInput(getActivity());
// return;
// }
// matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuName() + "");
// if (matcher.find()) {
// ((LinearLayoutManager) mViewBinding.replenishmentRightRecycler.getLayoutManager()).scrollToPositionWithOffset(i, 0);
// ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName());
// KeyboardUtils.hideSoftInput(getActivity());
// return;
// }
// }
//
// ToastUtils.showShort("没有找到相关货品");
// }
//}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentFragment.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
manage
.
replenishment
.
fragment
;
import
android.databinding.DataBindingUtil
;
import
android.graphics.Typeface
;
import
android.support.design.widget.TabLayout
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentReplenishementBinding
;
import
com.xingdata.zzdpos.databinding.ItemStringBinding
;
import
com.xingdata.zzdpos.model.Psb
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.main.adapter.FragmentViewAdapter
;
import
com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter
;
import
com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
/**
* Created by Administrator on 2017/11/24.
*/
public
class
ReplenishmentFragment
extends
BaseFragment
<
ReplenishmentPresenter
,
FragmentReplenishementBinding
>
{
private
int
[]
titleInts
=
{
R
.
string
.
manage_replenishment_unConfirmed
,
R
.
string
.
manage_replenishment_unReceive
,
R
.
string
.
manage_replenishment_finished
};
private
FragmentViewAdapter
mFragmentPagerAdapter
;
private
List
<
BaseFragment
>
fragments
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_replenishement
;
}
@Override
public
void
initView
()
{
initData
();
initTab
();
mPresenter
.
queryPsbList
();
mViewBinding
.
btnAdd
.
setOnClickListener
(
view
->
{
mPresenter
.
clickAdd
();
});
mViewBinding
.
icTitle
.
ivRight
.
setImageResource
(
R
.
mipmap
.
but_sweep_yard
);
mViewBinding
.
icTitle
.
edTitle
.
setHint
(
"请输入供货商名称"
);
mViewBinding
.
icTitle
.
edTitle
.
setOnClickListener
(
view
->
{
if
(
mViewBinding
.
icTitle
.
edTitle
.
getText
().
toString
().
trim
().
length
()
==
0
)
{
ToastUtils
.
showShort
(
"请输入供货商名称"
);
return
;
}
switch
(
mViewBinding
.
tab
.
getSelectedTabPosition
())
{
case
0
:
mPresenter
.
searchPsbList
(
mViewBinding
.
icTitle
.
edTitle
.
getText
().
toString
(),
(
ReplenishmentListFragment
)
fragments
.
get
(
0
));
break
;
case
1
:
mPresenter
.
searchPsbList
(
mViewBinding
.
icTitle
.
edTitle
.
getText
().
toString
(),
(
ReplenishmentListFragment
)
fragments
.
get
(
1
));
break
;
case
2
:
mPresenter
.
searchPsbList
(
mViewBinding
.
icTitle
.
edTitle
.
getText
().
toString
(),
(
ReplenishmentListFragment
)
fragments
.
get
(
2
));
break
;
}
});
}
private
void
initTab
()
{
mViewBinding
.
tab
.
setupWithViewPager
(
mViewBinding
.
fragmentContainer
);
Observable
.
create
(
new
ObservableOnSubscribe
<
View
>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
View
>
e
)
throws
Exception
{
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
}
}).
subscribeOn
(
Schedulers
.
newThread
()).
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
new
Consumer
<
View
>()
{
int
i
=
0
;
@Override
public
void
accept
(
View
view
)
throws
Exception
{
ItemStringBinding
itemMenuBottomBinding
=
DataBindingUtil
.
bind
(
view
);
if
(
i
==
0
)
{
itemMenuBottomBinding
.
itemTv
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
}
itemMenuBottomBinding
.
itemTv
.
setText
(
titleInts
[
i
]);
itemMenuBottomBinding
.
itemTv
.
setPadding
(
0
,
0
,
0
,
0
);
mViewBinding
.
tab
.
getTabAt
(
i
).
setCustomView
(
view
);
i
++;
}
});
mViewBinding
.
tab
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
@Override
public
void
onTabSelected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
}
@Override
public
void
onTabUnselected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
));
}
@Override
public
void
onTabReselected
(
TabLayout
.
Tab
tab
)
{
}
});
}
public
void
initData
()
{
fragments
=
new
ArrayList
<>();
fragments
.
add
(
new
ReplenishmentListFragment
());
fragments
.
add
(
new
ReplenishmentListFragment
());
fragments
.
add
(
new
ReplenishmentListFragment
());
mFragmentPagerAdapter
=
new
FragmentViewAdapter
(
fragments
,
getChildFragmentManager
());
mViewBinding
.
fragmentContainer
.
setAdapter
(
mFragmentPagerAdapter
);
}
public
void
showReplenishmentList
(
List
<
Psb
>
A
,
List
<
Psb
>
B
,
List
<
Psb
>
C
)
{
((
ReplenishmentListFragment
)
fragments
.
get
(
0
)).
setData
(
A
,
true
);
((
ReplenishmentListFragment
)
fragments
.
get
(
1
)).
setData
(
B
,
true
);
((
ReplenishmentListFragment
)
fragments
.
get
(
2
)).
setData
(
C
,
true
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentListFragment.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
manage
.
replenishment
.
fragment
;
import
android.content.Intent
;
import
android.os.Handler
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentReplenishmentListBinding
;
import
com.xingdata.zzdpos.databinding.FragmentServiceBinding
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Psb
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter
;
import
com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter
;
import
com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
class
ReplenishmentListFragment
extends
BaseFragment
<
ReplenishmentPresenter
,
FragmentReplenishmentListBinding
>
{
private
ReplenishmentAdapter
mReplenishmentAdapter
;
private
List
<
Psb
>
psbArrayList
=
new
ArrayList
<>();
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_replenishment_list
;
}
@Override
public
void
initView
()
{
if
(
mReplenishmentAdapter
==
null
)
{
mReplenishmentAdapter
=
new
ReplenishmentAdapter
(
psbArrayList
);
mViewBinding
.
recycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
recycler
.
setAdapter
(
mReplenishmentAdapter
);
}
else
{
mViewBinding
.
recycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
recycler
.
setAdapter
(
mReplenishmentAdapter
);
}
mReplenishmentAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Intent
intent
=
new
Intent
(
getActivity
(),
StatisticsDetailActivity
.
class
);
intent
.
putExtra
(
Saleorder
.
class
.
getName
(),
mReplenishmentAdapter
.
getData
().
get
(
position
).
getId
());
ActivityUtils
.
startActivity
(
intent
);
}
});
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
}
private
void
onRefresh
()
{
mPresenter
.
queryPsbList
();
}
/**
* 设置数据
*
* @param pager 数据
* @param isRefresh 是否刷新
*/
/**
* 设置数据
*
* @param psbList 数据
* @param isRefresh 是否刷新
*/
public
void
setData
(
List
<
Psb
>
psbList
,
boolean
isRefresh
)
{
if
(
mReplenishmentAdapter
==
null
)
{
psbArrayList
=
psbList
;
return
;
}
if
(
isRefresh
)
{
mReplenishmentAdapter
.
setEnableLoadMore
(
true
);
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
}
if
(
isRefresh
)
mReplenishmentAdapter
.
setNewData
(
psbList
);
else
if
(
psbList
.
size
()
>
0
)
mReplenishmentAdapter
.
addData
(
psbList
);
if
(
mReplenishmentAdapter
.
getData
().
size
()
==
0
)
{
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
recycler
.
setVisibility
(
View
.
GONE
);
}
else
{
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
recycler
.
setVisibility
(
View
.
VISIBLE
);
}
}
public
void
searchSucc
(
String
wd
)
{
List
<
Psb
>
psbs
=
new
ArrayList
<>();
if
(
psbArrayList
==
null
)
{
return
;
}
for
(
Psb
psb
:
psbArrayList
)
{
if
(
wd
.
trim
().
length
()
==
0
)
{
return
;
}
Pattern
pattern
=
Pattern
.
compile
(
wd
,
Pattern
.
CASE_INSENSITIVE
);
Matcher
matcher
=
pattern
.
matcher
((
psb
.
getOutChannelNameabcn
()
+
""
));
if
(
matcher
.
find
())
{
psbs
.
add
(
psb
);
}
}
mViewBinding
.
recycler
.
setVisibility
(
View
.
GONE
);
new
Handler
().
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
psbs
.
size
()
==
0
)
{
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
mReplenishmentAdapter
.
setNewData
(
psbs
);
mReplenishmentAdapter
.
loadMoreEnd
();
mViewBinding
.
recycler
.
setVisibility
(
View
.
VISIBLE
);
}
}
},
500
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/MsActivity.java
View file @
e2b78a68
...
@@ -6,9 +6,14 @@ import com.xingdata.zzdpos.R;
...
@@ -6,9 +6,14 @@ import com.xingdata.zzdpos.R;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.databinding.ActivityMsBinding
;
import
com.xingdata.zzdpos.databinding.ActivityMsBinding
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.marketing.ms.fragment.AddFragment
;
import
com.xingdata.zzdpos.ui.marketing.ms.fragment.AddFragment
;
import
com.xingdata.zzdpos.ui.marketing.ms.fragment.EditorFragment
;
import
com.xingdata.zzdpos.ui.marketing.ms.fragment.EditorFragment
;
import
com.xingdata.zzdpos.ui.marketing.ms.fragment.ManagerFragment
;
import
com.xingdata.zzdpos.ui.marketing.ms.fragment.ManagerFragment
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Area
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Group
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Type
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.User
;
import
java.util.List
;
import
java.util.List
;
...
@@ -18,6 +23,8 @@ public class MsActivity extends BaseActivity<MsPresenter, ActivityMsBinding> imp
...
@@ -18,6 +23,8 @@ public class MsActivity extends BaseActivity<MsPresenter, ActivityMsBinding> imp
private
EditorFragment
mEditorFragment
=
new
EditorFragment
();
private
EditorFragment
mEditorFragment
=
new
EditorFragment
();
private
AddFragment
mAddFragment
=
new
AddFragment
();
private
AddFragment
mAddFragment
=
new
AddFragment
();
private
LoadingDialog
mLoadingDialog
=
new
LoadingDialog
();
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_ms
;
return
R
.
layout
.
activity_ms
;
...
@@ -42,20 +49,42 @@ public class MsActivity extends BaseActivity<MsPresenter, ActivityMsBinding> imp
...
@@ -42,20 +49,42 @@ public class MsActivity extends BaseActivity<MsPresenter, ActivityMsBinding> imp
@Override
@Override
public
void
showEditorFragment
(
Ms
ms
)
{
public
void
showEditorFragment
(
Ms
ms
)
{
LogUtils
.
e
(
"编辑 "
+
ms
.
getMsName
());
LogUtils
.
e
(
"编辑 "
+
ms
.
getMsName
());
start
(
mEditorFragment
);
}
}
@Override
@Override
public
void
showEditorFragment
(
int
msType
)
{
public
void
showEditorFragment
(
int
msType
)
{
LogUtils
.
e
(
"添加 "
+
msType
);
LogUtils
.
e
(
"添加 "
+
msType
);
start
(
mEditorFragment
);
}
}
@Override
@Override
public
void
showLoadingDialog
()
{
public
void
loadTypes
(
List
<
Type
>
types
)
{
mAddFragment
.
loadTypes
(
types
);
}
@Override
public
void
loadAreas
(
List
<
Area
>
areas
)
{
mEditorFragment
.
loadArea
(
areas
);
}
}
@Override
@Override
public
void
dismissLoadingDialog
()
{
public
void
loadGroups
(
List
<
Group
>
groups
)
{
mEditorFragment
.
loadGroup
(
groups
);
}
@Override
public
void
loadUsers
(
List
<
User
>
users
)
{
mEditorFragment
.
loadUser
(
users
);
}
@Override
public
void
showLoadingDialog
()
{
mLoadingDialog
.
show
(
this
);
}
@Override
public
void
dismissLoadingDialog
()
{
mLoadingDialog
.
dismiss
();
}
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/MsContract.java
View file @
e2b78a68
...
@@ -3,6 +3,10 @@ package com.xingdata.zzdpos.ui.marketing.ms;
...
@@ -3,6 +3,10 @@ package com.xingdata.zzdpos.ui.marketing.ms;
import
com.xingdata.zzdpos.base.BasePresenter
;
import
com.xingdata.zzdpos.base.BasePresenter
;
import
com.xingdata.zzdpos.base.BaseView
;
import
com.xingdata.zzdpos.base.BaseView
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Area
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Group
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Type
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.User
;
import
java.util.List
;
import
java.util.List
;
...
@@ -27,7 +31,6 @@ interface MsContract {
...
@@ -27,7 +31,6 @@ interface MsContract {
*/
*/
void
showEditorFragment
(
Ms
ms
);
void
showEditorFragment
(
Ms
ms
);
/**
/**
* 显示编辑页面
* 显示编辑页面
*
*
...
@@ -35,6 +38,34 @@ interface MsContract {
...
@@ -35,6 +38,34 @@ interface MsContract {
*/
*/
void
showEditorFragment
(
int
msType
);
void
showEditorFragment
(
int
msType
);
/**
* 加载营销类型
*
* @param types 营销类型列表
*/
void
loadTypes
(
List
<
Type
>
types
);
/**
* 加载营销范围
*
* @param areas 营销范围列表
*/
void
loadAreas
(
List
<
Area
>
areas
);
/**
* 加载营销主体
*
* @param groups 营销主体列表
*/
void
loadGroups
(
List
<
Group
>
groups
);
/**
* 加载营销对象
*
* @param users 营销对象列表
*/
void
loadUsers
(
List
<
User
>
users
);
/**
/**
* 显示读取对话框
* 显示读取对话框
*/
*/
...
@@ -68,10 +99,20 @@ interface MsContract {
...
@@ -68,10 +99,20 @@ interface MsContract {
*/
*/
public
abstract
void
clickMsItem
(
Ms
ms
);
public
abstract
void
clickMsItem
(
Ms
ms
);
/**
* 添加页面 - 初始化
*/
public
abstract
void
initAdd
();
/**
/**
* 添加页面 - 点击类型的item
* 添加页面 - 点击类型的item
*/
*/
public
abstract
void
clickTypeItem
(
int
msType
);
public
abstract
void
clickTypeItem
(
Type
type
);
/**
* 编辑页面 - 初始化
*/
public
abstract
void
initEditor
();
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/MsPresenter.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
;
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.db.DBFactory
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Area
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Group
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Type
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.User
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
MsPresenter
extends
MsContract
.
Presenter
{
public
class
MsPresenter
extends
MsContract
.
Presenter
{
...
@@ -38,8 +47,46 @@ public class MsPresenter extends MsContract.Presenter {
...
@@ -38,8 +47,46 @@ public class MsPresenter extends MsContract.Presenter {
}
}
@Override
@Override
public
void
clickTypeItem
(
int
msType
)
{
public
void
initAdd
()
{
mView
.
showEditorFragment
(
msType
);
List
<
Type
>
types
=
new
ArrayList
<>();
types
.
add
(
new
Type
(
C
.
MS_TYPE
.
DIS
));
types
.
add
(
new
Type
(
C
.
MS_TYPE
.
PROMOTION
));
types
.
add
(
new
Type
(
C
.
MS_TYPE
.
MONEY_OFF
));
types
.
add
(
new
Type
(
C
.
MS_TYPE
.
GIFT
));
mView
.
loadTypes
(
types
);
}
@Override
public
void
clickTypeItem
(
Type
type
)
{
mView
.
showEditorFragment
(
type
.
getId
());
}
@Override
public
void
initEditor
()
{
List
<
Group
>
groups
=
new
ArrayList
<>();
groups
.
add
(
new
Group
(
C
.
MS_GROUP
.
ALL
,
"全场"
));
groups
.
add
(
new
Group
(
C
.
MS_GROUP
.
CATE
,
"指定品类"
));
groups
.
add
(
new
Group
(
C
.
MS_GROUP
.
SKU
,
"指定商品"
));
List
<
Area
>
areas
=
new
ArrayList
<>();
areas
.
add
(
new
Area
(
0
,
"所有门店"
));
areas
.
add
(
new
Area
(
1
,
"本店"
));
List
<
User
>
users
=
new
ArrayList
<>();
users
.
add
(
new
User
(
0
,
"所有顾客"
,
0
));
users
.
add
(
new
User
(
0
,
"所有会员"
,
0
));
DBFactory
.
Marketing
.
Ms
.
queryLevel
()
.
doFinally
(()
->
{
mView
.
loadUsers
(
users
);
mView
.
loadGroups
(
groups
);
mView
.
loadAreas
(
areas
);
})
.
subscribe
(
levels
->
{
for
(
int
i
=
0
;
i
<
levels
.
size
();
i
++)
{
users
.
add
(
new
User
(
1
,
levels
.
get
(
i
).
getVipLevelName
(),
levels
.
get
(
i
).
getVipLevel
()));
}
});
}
}
/**
/**
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/adapter/BeanAdapter.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
adapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseSelectedAdapter
;
import
com.xingdata.zzdpos.base.BaseViewHolder
;
import
com.xingdata.zzdpos.databinding.ItemSelectorBinding
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.BaseBean
;
import
java.util.ArrayList
;
public
class
BeanAdapter
<
T
extends
BaseBean
>
extends
BaseSelectedAdapter
<
T
,
ItemSelectorBinding
>
{
public
BeanAdapter
()
{
super
(
R
.
layout
.
item_selector
,
new
ArrayList
<>(),
true
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ItemSelectorBinding
mViewBinding
,
T
item
)
{
mViewBinding
.
setSelected
(
getSelectedPosition
()
==
helper
.
getAdapterPosition
());
mViewBinding
.
tvName
.
getPaint
().
setFakeBoldText
(
getSelectedPosition
()
==
helper
.
getAdapterPosition
());
mViewBinding
.
tvName
.
setText
(
item
.
getName
());
}
public
String
[]
getStrs
()
{
String
[]
strs
=
new
String
[
getData
().
size
()];
for
(
int
i
=
0
;
i
<
getData
().
size
();
i
++)
{
strs
[
i
]
=
getData
().
get
(
i
).
getName
();
}
return
strs
;
}
public
<
B
extends
BaseBean
>
void
setItemId
(
B
b
)
{
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/adapter/TypeAdapter.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
adapter
;
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
adapter
;
import
android.support.annotation.Nullable
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemMsTypeBinding
;
import
com.xingdata.zzdpos.databinding.ItemMsTypeBinding
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Type
;
import
java.util.List
;
import
java.util.
Array
List
;
public
class
TypeAdapter
extends
BaseAdapter
<
Integer
,
ItemMsTypeBinding
>
{
public
class
TypeAdapter
extends
BaseAdapter
<
Type
,
ItemMsTypeBinding
>
{
public
TypeAdapter
(
@Nullable
List
<
Integer
>
data
)
{
public
TypeAdapter
()
{
super
(
R
.
layout
.
item_ms_type
,
data
);
super
(
R
.
layout
.
item_ms_type
,
new
ArrayList
<>()
);
}
}
@Override
@Override
protected
void
convert
(
ItemMsTypeBinding
mViewBinding
,
Integer
item
)
{
protected
void
convert
(
ItemMsTypeBinding
mViewBinding
,
Type
item
)
{
int
resPic
=
-
1
,
resStr
=
-
1
;
int
resPic
=
-
1
,
resStr
=
-
1
;
switch
(
item
)
{
switch
(
item
.
getId
()
)
{
case
C
.
MS_TYPE
.
DIS
:
case
C
.
MS_TYPE
.
DIS
:
resPic
=
R
.
mipmap
.
icon_discount02
;
resPic
=
R
.
mipmap
.
icon_discount02
;
resStr
=
R
.
string
.
ms_type_dis
;
resStr
=
R
.
string
.
ms_type_dis
;
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/fragment/AddFragment.java
View file @
e2b78a68
...
@@ -2,19 +2,20 @@ package com.xingdata.zzdpos.ui.marketing.ms.fragment;
...
@@ -2,19 +2,20 @@ package com.xingdata.zzdpos.ui.marketing.ms.fragment;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.GridLayoutManager
;
import
com.xingdata.zzdpos.C
;
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.FragmentMsAddBinding
;
import
com.xingdata.zzdpos.databinding.FragmentMsAddBinding
;
import
com.xingdata.zzdpos.ui.marketing.ms.MsPresenter
;
import
com.xingdata.zzdpos.ui.marketing.ms.MsPresenter
;
import
com.xingdata.zzdpos.ui.marketing.ms.adapter.TypeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.ms.adapter.TypeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Type
;
import
com.xingdata.zzdpos.util.MyMenuItemDecoration
;
import
com.xingdata.zzdpos.util.MyMenuItemDecoration
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
AddFragment
extends
BaseFragment
<
MsPresenter
,
FragmentMsAddBinding
>
{
public
class
AddFragment
extends
BaseFragment
<
MsPresenter
,
FragmentMsAddBinding
>
{
private
TypeAdapter
mTypeAdapter
;
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_ms_add
;
return
R
.
layout
.
fragment_ms_add
;
...
@@ -23,24 +24,28 @@ public class AddFragment extends BaseFragment<MsPresenter, FragmentMsAddBinding>
...
@@ -23,24 +24,28 @@ public class AddFragment extends BaseFragment<MsPresenter, FragmentMsAddBinding>
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
// init type
// init type
TypeAdapter
mTypeAdapter
=
new
TypeAdapter
(
getTypeList
()
);
mTypeAdapter
=
new
TypeAdapter
(
);
mViewBinding
.
rlType
.
setAdapter
(
mTypeAdapter
);
mViewBinding
.
rlType
.
setAdapter
(
mTypeAdapter
);
mViewBinding
.
rlType
.
setLayoutManager
(
new
GridLayoutManager
(
mContext
,
2
));
mViewBinding
.
rlType
.
setLayoutManager
(
new
GridLayoutManager
(
mContext
,
2
));
mViewBinding
.
rlType
.
addItemDecoration
(
new
MyMenuItemDecoration
(
mContext
,
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
)));
mViewBinding
.
rlType
.
addItemDecoration
(
new
MyMenuItemDecoration
(
mContext
,
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
)));
// set t listener
// set t listener
mTypeAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
mPresenter
.
clickTypeItem
(
mTypeAdapter
.
getData
().
get
(
position
)));
mTypeAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
this
.
pop
();
mPresenter
.
clickTypeItem
(
mTypeAdapter
.
getData
().
get
(
position
));
});
// init data
mPresenter
.
initAdd
();
}
}
/**
/**
* 加载营销类型
*
*
* @param types 营销类型列表
*/
*/
private
List
<
Integer
>
getTypeList
()
{
public
void
loadTypes
(
List
<
Type
>
types
)
{
List
<
Integer
>
msList
=
new
ArrayList
<>();
mTypeAdapter
.
setNewData
(
types
);
msList
.
add
(
C
.
MS_TYPE
.
DIS
);
msList
.
add
(
C
.
MS_TYPE
.
PROMOTION
);
msList
.
add
(
C
.
MS_TYPE
.
MONEY_OFF
);
msList
.
add
(
C
.
MS_TYPE
.
GIFT
);
return
msList
;
}
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/fragment/EditorFragment.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
fragment
;
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
fragment
;
import
android.app.DatePickerDialog
;
import
android.app.TimePickerDialog
;
import
android.content.DialogInterface
;
import
android.databinding.DataBindingUtil
;
import
android.os.Build
;
import
android.support.v7.app.AlertDialog
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
com.blankj.utilcode.util.FragmentUtils
;
import
com.xingdata.zzdpos.C
;
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.FragmentMsEditorBinding
;
import
com.xingdata.zzdpos.databinding.FragmentMsEditorBinding
;
import
com.xingdata.zzdpos.databinding.ViewTimeDetailBinding
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.ui.marketing.ms.MsPresenter
;
import
com.xingdata.zzdpos.ui.marketing.ms.MsPresenter
;
import
com.xingdata.zzdpos.ui.marketing.ms.adapter.BeanAdapter
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Area
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.Group
;
import
com.xingdata.zzdpos.ui.marketing.ms.model.User
;
import
com.xingdata.zzdpos.ui.marketing.ms.view.BaseGroupView
;
import
com.xingdata.zzdpos.ui.marketing.ms.view.GroupAllView
;
import
com.xingdata.zzdpos.ui.marketing.ms.view.GroupCateView
;
import
com.xingdata.zzdpos.ui.marketing.ms.view.GroupSkuView
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
java.util.List
;
public
class
EditorFragment
extends
BaseFragment
<
MsPresenter
,
FragmentMsEditorBinding
>
{
public
class
EditorFragment
extends
BaseFragment
<
MsPresenter
,
FragmentMsEditorBinding
>
{
private
Ms
mMs
;
private
BeanAdapter
<
Group
>
mGroupAdapter
;
private
BeanAdapter
<
Area
>
mAreaAdapter
;
private
BeanAdapter
<
User
>
mUserAdapter
;
private
DatePickerDialog
mDateStartDialog
,
mDateEndDialog
;
private
TimePickerDialog
mTimeStartDialog
,
mTimeEndDialog
;
private
ViewTimeDetailBinding
mTimeDetailBinding
;
private
BaseGroupView
mGroupView
;
private
GroupAllView
mGroupAllView
=
new
GroupAllView
();
private
GroupCateView
mGroupCateView
=
new
GroupCateView
();
private
GroupSkuView
mGroupSkuView
=
new
GroupSkuView
();
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_ms_editor
;
return
R
.
layout
.
fragment_ms_editor
;
...
@@ -14,6 +55,287 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi
...
@@ -14,6 +55,287 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
{
//TODO DELETE
mMs
=
new
Ms
();
mMs
.
setMsDateBegin
(
20170105L
);
mMs
.
setMsDateEnd
(
20170115L
);
mMs
.
setMsTimeBegin
(
000000
L
);
mMs
.
setMsTimeEnd
(
235959L
);
mMs
.
setMsWeekPlan
(
"1,2,3,5"
);
}
initInfoViews
();
initTimeViews
();
initMsViews
();
mPresenter
.
initEditor
();
}
/**
* 营销方案
*/
public
EditorFragment
setMs
(
Ms
ms
)
{
this
.
mMs
=
ms
;
return
this
;
}
/**
* 加载主体对象
*
* @param groups 营销主体列表
*/
public
void
loadGroup
(
List
<
Group
>
groups
)
{
mGroupAdapter
.
setNewData
(
groups
);
}
/**
* 加载营销对象
*
* @param users 营销对象列表
*/
public
void
loadUser
(
List
<
User
>
users
)
{
mUserAdapter
.
setNewData
(
users
);
}
/**
* 加载范围对象
*
* @param areas 营销范围列表
*/
public
void
loadArea
(
List
<
Area
>
areas
)
{
mAreaAdapter
.
setNewData
(
areas
);
}
/**
* 初始化基本信息界面
*/
private
void
initInfoViews
()
{
}
}
private
void
setViewByMs
()
{
mViewBinding
.
setName
(
mMs
.
getMsName
());
mViewBinding
.
setDateStart
(
new
StringBuffer
(
mMs
.
getMsDateBegin
().
toString
()).
insert
(
8
,
"日"
).
insert
(
6
,
"月"
).
insert
(
4
,
"年"
).
toString
());
mViewBinding
.
setDateEnd
(
new
StringBuffer
(
mMs
.
getMsDateEnd
().
toString
()).
insert
(
8
,
"日"
).
insert
(
6
,
"月"
).
insert
(
4
,
"年"
).
toString
());
}
/**
* 初始化时间信息界面
*/
private
void
initTimeViews
()
{
//init
mTimeDetailBinding
=
null
;
//view stub
mViewBinding
.
vsTimeDetail
.
getViewStub
().
setOnInflateListener
((
viewStub
,
view
)
->
initTimeDetailViews
(
view
));
//date
mViewBinding
.
llDateStart
.
setOnClickListener
(
view
->
{
if
(
mDateStartDialog
==
null
)
initDateStartDialog
();
mDateStartDialog
.
show
();
});
mViewBinding
.
llDateEnd
.
setOnClickListener
(
view
->
{
if
(
mDateEndDialog
==
null
)
initDateEndDialog
();
mDateEndDialog
.
show
();
});
// listener
mViewBinding
.
tvTimeMore
.
setOnClickListener
(
view
->
{
if
(
mTimeDetailBinding
==
null
)
{
mViewBinding
.
vsTimeDetail
.
getViewStub
().
inflate
();
}
else
if
(
mTimeDetailBinding
.
getRoot
().
getVisibility
()
==
View
.
VISIBLE
)
{
mTimeDetailBinding
.
getRoot
().
setVisibility
(
View
.
GONE
);
}
else
{
mTimeDetailBinding
.
getRoot
().
setVisibility
(
View
.
VISIBLE
);
}
});
}
/**
* 初始化时间信息详情界面
*
* @param v viewStub的parent
*/
private
void
initTimeDetailViews
(
View
v
)
{
mTimeDetailBinding
=
DataBindingUtil
.
bind
(
v
);
//time
StringBuilder
strTimeBegin
=
new
StringBuilder
(
mMs
.
getMsTimeBegin
().
toString
());
StringBuilder
strTimeEnd
=
new
StringBuilder
(
mMs
.
getMsTimeEnd
().
toString
());
for
(
int
i
=
strTimeBegin
.
length
();
i
<
6
;
i
++)
{
strTimeBegin
.
insert
(
0
,
"0"
);
}
for
(
int
i
=
strTimeEnd
.
length
();
i
<
6
;
i
++)
{
strTimeEnd
.
insert
(
0
,
"0"
);
}
mTimeDetailBinding
.
setTimeStart
(
strTimeBegin
.
delete
(
4
,
6
).
insert
(
2
,
":"
).
toString
());
mTimeDetailBinding
.
setTimeEnd
(
strTimeEnd
.
delete
(
4
,
6
).
insert
(
2
,
":"
).
toString
());
// week
mTimeDetailBinding
.
cbSun
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"1"
));
mTimeDetailBinding
.
cbMon
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"2"
));
mTimeDetailBinding
.
cbTue
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"3"
));
mTimeDetailBinding
.
cbWed
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"4"
));
mTimeDetailBinding
.
cbThu
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"5"
));
mTimeDetailBinding
.
cbFri
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"6"
));
mTimeDetailBinding
.
cbSat
.
setChecked
(
mMs
.
getMsWeekPlan
().
contains
(
"7"
));
// listener
mTimeDetailBinding
.
tvTimeStart
.
setOnClickListener
(
view
->
{
if
(
mTimeStartDialog
==
null
)
initTimeStartDialog
();
mTimeStartDialog
.
show
();
});
mTimeDetailBinding
.
tvTimeEnd
.
setOnClickListener
(
view
->
{
if
(
mTimeEndDialog
==
null
)
initTimeEndDialog
();
mTimeEndDialog
.
show
();
});
}
/**
* 初始化活动信息界面
*/
private
void
initMsViews
()
{
// group
mGroupAdapter
=
new
BeanAdapter
<>();
mViewBinding
.
rlGroup
.
setAdapter
(
mGroupAdapter
);
mViewBinding
.
rlGroup
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
// area
mAreaAdapter
=
new
BeanAdapter
<>();
// user
mUserAdapter
=
new
BeanAdapter
<>();
// listener
mGroupAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
});
mViewBinding
.
llArea
.
setOnClickListener
(
view
->
showSelectorDialog
(
R
.
string
.
ms_editor_area
,
mAreaAdapter
,
(
dialog
,
which
)
->
{
mViewBinding
.
setArea
(
mAreaAdapter
.
getStrs
()[
which
]);
mAreaAdapter
.
setSelectedPosition
(
which
);
dialog
.
dismiss
();
})
);
mViewBinding
.
llUser
.
setOnClickListener
(
view
->
showSelectorDialog
(
R
.
string
.
ms_editor_user
,
mUserAdapter
,
(
dialog
,
which
)
->
{
mViewBinding
.
setUser
(
mUserAdapter
.
getStrs
()[
which
]);
mUserAdapter
.
setSelectedPosition
(
which
);
dialog
.
dismiss
();
})
);
mGroupAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
switch
(
mGroupAdapter
.
getData
().
get
(
position
).
getId
())
{
case
C
.
MS_GROUP
.
ALL
:
mGroupView
=
mGroupAllView
;
break
;
case
C
.
MS_GROUP
.
CATE
:
mGroupView
=
mGroupCateView
;
break
;
case
C
.
MS_GROUP
.
SKU
:
mGroupView
=
mGroupSkuView
;
break
;
}
mGroupView
.
setMs
(
mMs
);
if
(
getChildFragmentManager
().
getFragments
().
size
()
==
0
)
{
FragmentUtils
.
add
(
getChildFragmentManager
(),
mGroupView
,
R
.
id
.
f_group
);
}
else
{
FragmentUtils
.
replace
(
getChildFragmentManager
(),
mGroupView
,
R
.
id
.
f_group
);
}
});
}
/**
* 初始化开始日期选择对话框
*/
private
void
initDateStartDialog
()
{
String
[]
strings
=
mViewBinding
.
getDateStart
().
split
(
"[^x00-xff]"
);
mDateStartDialog
=
new
DatePickerDialog
(
mContext
,
0
,
(
datePicker
,
year
,
month
,
day
)
->
{
String
m
=
String
.
valueOf
(
month
+
1
).
length
()
>=
2
?
String
.
valueOf
(
month
+
1
)
:
"0"
+
String
.
valueOf
(
month
+
1
);
String
d
=
String
.
valueOf
(
day
).
length
()
>=
2
?
String
.
valueOf
(
day
)
:
"0"
+
String
.
valueOf
(
day
);
mViewBinding
.
setDateStart
(
year
+
"年"
+
m
+
"月"
+
d
+
"日"
);
mMs
.
setMsDateBegin
(
ConvertUtil
.
stringToLong
(
year
+
m
+
d
));
if
(
mMs
.
getMsDateBegin
()
>
mMs
.
getMsDateEnd
())
{
mViewBinding
.
setDateEnd
(
mViewBinding
.
getDateStart
());
if
(
mDateEndDialog
!=
null
)
mDateEndDialog
.
updateDate
(
year
,
month
,
day
);
}
},
Integer
.
valueOf
(
strings
[
0
]),
Integer
.
valueOf
(
strings
[
1
])
-
1
,
Integer
.
valueOf
(
strings
[
2
]));
}
/**
* 初始化结束日期选择对话框
*/
private
void
initDateEndDialog
()
{
String
[]
strings
=
mViewBinding
.
getDateEnd
().
split
(
"[^x00-xff]"
);
mDateEndDialog
=
new
DatePickerDialog
(
mContext
,
(
datePicker
,
year
,
month
,
day
)
->
{
String
m
=
String
.
valueOf
(
month
+
1
).
length
()
>=
2
?
String
.
valueOf
(
month
+
1
)
:
"0"
+
String
.
valueOf
(
month
+
1
);
String
d
=
String
.
valueOf
(
day
).
length
()
>=
2
?
String
.
valueOf
(
day
)
:
"0"
+
String
.
valueOf
(
day
);
mViewBinding
.
setDateEnd
(
year
+
"年"
+
m
+
"月"
+
d
+
"日"
);
mMs
.
setMsDateEnd
(
ConvertUtil
.
stringToLong
(
year
+
m
+
d
));
if
(
mMs
.
getMsDateBegin
()
>
mMs
.
getMsDateEnd
())
{
mViewBinding
.
setDateStart
(
mViewBinding
.
getDateEnd
());
if
(
mDateStartDialog
!=
null
)
mDateStartDialog
.
updateDate
(
year
,
month
,
day
);
}
},
Integer
.
valueOf
(
strings
[
0
]),
Integer
.
valueOf
(
strings
[
1
])
-
1
,
Integer
.
valueOf
(
strings
[
2
]));
}
/**
* 初始化开始时间选择对话框
*/
private
void
initTimeStartDialog
()
{
String
[]
strings
=
mTimeDetailBinding
.
getTimeStart
().
split
(
":"
);
mTimeStartDialog
=
new
TimePickerDialog
(
mContext
,
(
timePicker
,
hourOfDay
,
minute
)
->
{
String
h
=
String
.
valueOf
(
hourOfDay
).
length
()
>=
2
?
String
.
valueOf
(
hourOfDay
)
:
"0"
+
String
.
valueOf
(
hourOfDay
);
String
m
=
String
.
valueOf
(
minute
).
length
()
>=
2
?
String
.
valueOf
(
minute
)
:
"0"
+
String
.
valueOf
(
minute
);
mTimeDetailBinding
.
setTimeStart
(
h
+
":"
+
m
);
mMs
.
setMsTimeBegin
(
ConvertUtil
.
stringToLong
(
h
+
""
+
m
+
59
));
if
(
mMs
.
getMsTimeBegin
()
>
mMs
.
getMsTimeEnd
())
{
mTimeDetailBinding
.
setTimeEnd
(
mTimeDetailBinding
.
getTimeStart
());
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
&&
mTimeEndDialog
!=
null
)
{
mTimeEndDialog
.
updateTime
(
hourOfDay
,
minute
);
}
}
},
Integer
.
valueOf
(
strings
[
0
]),
Integer
.
valueOf
(
strings
[
1
]),
true
);
}
/**
* 初始化结束时间选择对话框
*/
private
void
initTimeEndDialog
()
{
String
[]
strings
=
mTimeDetailBinding
.
getTimeEnd
().
split
(
":"
);
mTimeEndDialog
=
new
TimePickerDialog
(
mContext
,
(
timePicker
,
hourOfDay
,
minute
)
->
{
String
h
=
String
.
valueOf
(
hourOfDay
).
length
()
>=
2
?
String
.
valueOf
(
hourOfDay
)
:
"0"
+
String
.
valueOf
(
hourOfDay
);
String
m
=
String
.
valueOf
(
minute
).
length
()
>=
2
?
String
.
valueOf
(
minute
)
:
"0"
+
String
.
valueOf
(
minute
);
mTimeDetailBinding
.
setTimeEnd
(
h
+
":"
+
m
);
mMs
.
setMsTimeEnd
(
ConvertUtil
.
stringToLong
(
h
+
""
+
m
+
59
));
if
(
mMs
.
getMsTimeBegin
()
>
mMs
.
getMsTimeEnd
())
{
mTimeDetailBinding
.
setTimeStart
(
mTimeDetailBinding
.
getTimeEnd
());
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
&&
mTimeStartDialog
!=
null
)
{
mTimeStartDialog
.
updateTime
(
hourOfDay
,
minute
);
}
}
},
Integer
.
valueOf
(
strings
[
0
]),
Integer
.
valueOf
(
strings
[
1
]),
true
);
}
/**
* 显示选择对话框
*
* @param title 标题
* @param adapter 适配器信息
* @param onClickListener item点击事件
*/
private
void
showSelectorDialog
(
int
title
,
BeanAdapter
adapter
,
DialogInterface
.
OnClickListener
onClickListener
)
{
new
AlertDialog
.
Builder
(
mContext
).
setTitle
(
title
)
.
setSingleChoiceItems
(
adapter
.
getStrs
(),
adapter
.
getSelectedPosition
(),
onClickListener
)
.
create
().
show
();
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/Area.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
model
;
public
class
Area
extends
BaseBean
{
public
Area
(
int
id
,
String
name
)
{
setId
(
id
);
setName
(
name
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/BaseBean.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
model
;
public
class
BaseBean
{
private
int
id
;
private
String
name
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/Group.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
model
;
public
class
Group
extends
BaseBean
{
public
Group
(
int
id
,
String
name
)
{
setId
(
id
);
setName
(
name
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/Type.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
model
;
public
class
Type
extends
BaseBean
{
public
Type
(
int
id
)
{
setId
(
id
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/model/User.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
model
;
public
class
User
extends
BaseBean
{
public
User
(
int
id
,
String
name
,
int
levelId
)
{
setId
(
id
);
setName
(
name
);
setLevelId
(
levelId
);
}
private
int
levelId
;
public
int
getLevelId
()
{
return
levelId
;
}
public
void
setLevelId
(
int
levelId
)
{
this
.
levelId
=
levelId
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/BaseGroupView.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
view
;
import
android.databinding.ViewDataBinding
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.ui.marketing.ms.MsPresenter
;
public
abstract
class
BaseGroupView
<
B
extends
ViewDataBinding
>
extends
BaseFragment
<
MsPresenter
,
B
>
{
public
Ms
mMs
;
@Override
public
void
initView
()
{
if
(
mMs
!=
null
)
setViewByMs
();
}
protected
abstract
void
setViewByMs
();
/**
* 设置营销计划
*
* @param ms 营销计划实体
* @return this
*/
public
BaseGroupView
setMs
(
Ms
ms
)
{
this
.
mMs
=
ms
;
return
this
;
}
/**
* 获取当前页面的属性赋给营销计划实体
*
* @param ms 要编辑的营销计划
* @return 是否成功赋值
*/
public
abstract
boolean
processMs
(
Ms
ms
);
@Override
public
void
onDestroyView
()
{
if
(
mMs
!=
null
)
processMs
(
mMs
);
super
.
onDestroyView
();
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/GroupAllView.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
view
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.databinding.ViewGroupAllBinding
;
import
com.xingdata.zzdpos.model.Ms
;
/**
* 全场页面
*/
public
class
GroupAllView
extends
BaseGroupView
<
ViewGroupAllBinding
>
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
view_group_all
;
}
@Override
protected
void
setViewByMs
()
{
}
@Override
public
boolean
processMs
(
Ms
ms
)
{
ms
.
setMsTouchTag2
((
byte
)
C
.
MS_GROUP
.
ALL
);
return
true
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/GroupCateView.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
view
;
import
android.view.View
;
import
android.widget.AdapterView
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.databinding.ViewGroupCateBinding
;
import
com.xingdata.zzdpos.model.Category
;
import
com.xingdata.zzdpos.model.Ms
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 指定品类页面
*/
public
class
GroupCateView
extends
BaseGroupView
<
ViewGroupCateBinding
>
{
private
int
mClaPosition
=
0
,
mGrpPosition
=
0
,
mCatePosition
=
0
;
private
List
<
Category
>
mClas
,
mGrps
,
mCates
;
private
AdapterView
.
OnItemSelectedListener
mOnItemSelectedListener
;
private
long
cateId
;
public
GroupCateView
()
{
mOnItemSelectedListener
=
new
AdapterView
.
OnItemSelectedListener
()
{
@Override
public
void
onItemSelected
(
AdapterView
<?>
adapterView
,
View
view
,
int
i
,
long
l
)
{
switch
(
adapterView
.
getId
())
{
case
R
.
id
.
ns_type_1
:
mClaPosition
=
i
;
mGrpPosition
=
0
;
mCatePosition
=
0
;
mViewBinding
.
nsType3
.
setVisibility
(
View
.
GONE
);
loadGrp
(
mClas
.
get
(
i
));
cateId
=
mClas
.
get
(
i
).
getSpuCateId
();
break
;
case
R
.
id
.
ns_type_2
:
mGrpPosition
=
i
;
mCatePosition
=
0
;
if
(
mGrps
.
get
(
i
).
getSpuCateId
()
>
0
)
{
loadCate
(
mGrps
.
get
(
i
));
cateId
=
mGrps
.
get
(
i
).
getSpuCateId
();
mViewBinding
.
nsType3
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
cateId
=
mClas
.
get
(
mClaPosition
).
getSpuCateId
();
mViewBinding
.
nsType3
.
setVisibility
(
View
.
GONE
);
}
break
;
case
R
.
id
.
ns_type_3
:
mCatePosition
=
i
;
if
(
mCates
.
get
(
i
).
getSpuCateId
()
<
0
)
{
cateId
=
mGrps
.
get
(
mGrpPosition
).
getSpuCateId
();
}
else
{
cateId
=
mCates
.
get
(
i
).
getSpuCateId
();
}
break
;
}
}
@Override
public
void
onNothingSelected
(
AdapterView
<?>
adapterView
)
{
}
};
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
view_group_cate
;
}
@Override
public
void
initView
()
{
super
.
initView
();
loadCla
();
mViewBinding
.
nsType1
.
setOnItemSelectedListener
(
mOnItemSelectedListener
);
mViewBinding
.
nsType2
.
setOnItemSelectedListener
(
mOnItemSelectedListener
);
mViewBinding
.
nsType3
.
setOnItemSelectedListener
(
mOnItemSelectedListener
);
}
@Override
protected
void
setViewByMs
()
{
}
@Override
public
boolean
processMs
(
Ms
ms
)
{
ms
.
setMsTouchTag2
((
byte
)
C
.
MS_GROUP
.
CATE
);
ms
.
setSpuCateId
((
int
)
cateId
);
return
true
;
}
/**
* 加载大类
*/
private
void
loadCla
()
{
ApiFactory
.
Shop
.
queryAll
().
subscribe
(
categories
->
{
mClas
=
categories
;
List
<
String
>
strClas
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
categories
.
size
();
i
++)
{
if
(
mMs
!=
null
&&
mMs
.
getSpuCateId
()
!=
null
&&
mMs
.
getSpuCateId
()
/
10000
==
categories
.
get
(
i
).
getSpuCateId
()
/
10000
)
mClaPosition
=
i
;
strClas
.
add
(
categories
.
get
(
i
).
getSpuClaName
());
}
mViewBinding
.
nsType1
.
attachDataSource
(
strClas
);
mViewBinding
.
nsType1
.
setSelectedIndex
(
mClaPosition
);
cateId
=
mClas
.
get
(
0
).
getSpuCateId
();
loadGrp
(
mClas
.
get
(
mClaPosition
));
},
throwable
->
{
});
}
/**
* 设置大类信息,加载中类
*
* @param cateCla 大类信息
*/
private
void
loadGrp
(
Category
cateCla
)
{
ApiFactory
.
Shop
.
queryAll
(
cateCla
).
subscribe
(
categories
->
{
Category
category
=
new
Category
();
category
.
setSpuGrpName
(
"全部"
);
category
.
setSpuCateId
(
cateCla
.
getSpuCateId
());
categories
.
add
(
0
,
category
);
mGrps
=
categories
;
List
<
String
>
strGrps
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
categories
.
size
();
j
++)
{
if
(
mMs
!=
null
&&
mMs
.
getSpuCateId
()
!=
null
&&
mMs
.
getSpuCateId
()
/
100
==
categories
.
get
(
j
).
getSpuCateId
()
/
100
)
mGrpPosition
=
j
;
strGrps
.
add
(
categories
.
get
(
j
).
getSpuGrpName
());
}
mViewBinding
.
nsType2
.
attachDataSource
(
strGrps
);
mViewBinding
.
nsType2
.
setSelectedIndex
(
mGrpPosition
);
if
(
mGrpPosition
!=
0
)
{
loadCate
(
mGrps
.
get
(
mGrpPosition
));
mViewBinding
.
nsType3
.
setVisibility
(
View
.
VISIBLE
);
}
},
throwable
->
{
});
}
/**
* 设置中类信息,加载小类
*
* @param cateGrp 中类信息
*/
private
void
loadCate
(
Category
cateGrp
)
{
ApiFactory
.
Shop
.
queryAll
(
cateGrp
).
subscribe
(
categories
->
{
Category
category
=
new
Category
();
category
.
setSpuCateName
(
"全部"
);
category
.
setSpuCateId
(
cateGrp
.
getSpuCateId
());
categories
.
add
(
0
,
category
);
mCates
=
categories
;
List
<
String
>
strCates
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
categories
.
size
();
j
++)
{
if
(
mMs
!=
null
&&
mMs
.
getSpuCateId
()
!=
null
&&
mMs
.
getSpuCateId
().
longValue
()
==
categories
.
get
(
j
).
getSpuCateId
())
mCatePosition
=
j
;
strCates
.
add
(
categories
.
get
(
j
).
getSpuCateName
());
}
mViewBinding
.
nsType3
.
attachDataSource
(
strCates
);
mViewBinding
.
nsType3
.
setSelectedIndex
(
mCatePosition
);
},
throwable
->
{
});
}
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/ms/view/GroupSkuView.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
ms
.
view
;
import
android.annotation.SuppressLint
;
import
android.view.View
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.databinding.ViewGroupSkuBinding
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Sssku
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
/**
* 指定商品页面
*/
public
class
GroupSkuView
extends
BaseGroupView
<
ViewGroupSkuBinding
>
{
private
Sssku
mSssku
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
view_group_sku
;
}
@Override
public
void
initView
()
{
super
.
initView
();
mViewBinding
.
btnSearch
.
setOnClickListener
(
view
->
{
//TODO
// mPresenter.clickGroupSkuSearchButton(mViewBinding.etKeyword.getText().toString());
});
mViewBinding
.
etKeyword
.
requestFocus
();
}
@SuppressLint
(
"SetTextI18n"
)
@Override
protected
void
setViewByMs
()
{
if
(
mMs
.
getMsTouchTag2
()
==
null
||
mMs
.
getMsTouchTag2
()
!=
C
.
MS_GROUP
.
SKU
)
return
;
mViewBinding
.
llProduct
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
etKeyword
.
setText
(
ConvertUtil
.
longToString
(
mMs
.
getSkuBarCode
()));
mViewBinding
.
tvProductName
.
setText
(
getString
(
R
.
string
.
ms_editor_group_sku_name
)
+
mMs
.
getSkuName
());
mViewBinding
.
tvProductPrice
.
setText
(
getString
(
R
.
string
.
ms_editor_group_sku_price
)
+
ConvertUtil
.
fenToYuan
(
mMs
.
getSkuPrice1
(),
true
));
}
@Override
public
boolean
processMs
(
Ms
ms
)
{
ms
.
setMsTouchTag2
((
byte
)
C
.
MS_GROUP
.
SKU
);
if
(
mSssku
==
null
&&
ms
.
getSkuId
()
==
null
)
return
false
;
if
(
mSssku
!=
null
)
ms
.
setSkuId
(
mSssku
.
getSkuId
());
return
true
;
}
@SuppressLint
(
"SetTextI18n"
)
public
void
loadSssku
(
Sssku
sssku
)
{
this
.
mSssku
=
sssku
;
if
(
sssku
!=
null
)
{
mViewBinding
.
etKeyword
.
setText
(
ConvertUtil
.
longToString
(
sssku
.
getSpuBarcode
()));
mViewBinding
.
tvProductName
.
setText
(
getString
(
R
.
string
.
ms_editor_group_sku_name
)
+
sssku
.
getSpuName
());
mViewBinding
.
tvProductPrice
.
setText
(
getString
(
R
.
string
.
ms_editor_group_sku_price
)
+
ConvertUtil
.
fenToYuan
(
sssku
.
getSkuRetailPrice1
(),
true
));
mViewBinding
.
llProduct
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
mViewBinding
.
llProduct
.
setVisibility
(
View
.
GONE
);
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
;
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
;
import
android.content.Context
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.xingdata.api.print.ZX_PrintPOS
;
import
com.xingdata.zzdpos.App
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.db.DBFactory
;
import
com.xingdata.zzdpos.db.DBFactory
;
...
@@ -11,6 +15,7 @@ import com.xingdata.zzdpos.model.Saledetail;
...
@@ -11,6 +15,7 @@ import com.xingdata.zzdpos.model.Saledetail;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.main.MainActivity
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -301,6 +306,7 @@ public class SettlePresenter extends SettleContract.Presenter {
...
@@ -301,6 +306,7 @@ 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
);
}
}
/**
/**
...
...
app/src/main/java/com/xingdata/zzdpos/ui/settle/fragment/SettleFragment.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
.
fragment
;
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
.
fragment
;
import
android.support.annotation.NonNull
;
import
android.support.design.widget.BottomSheetBehavior
;
import
android.support.design.widget.BottomSheetBehavior
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
...
@@ -58,6 +59,17 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
...
@@ -58,6 +59,17 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
mViewBinding
.
cbPoint
.
setButtonDrawable
(
b
?
R
.
mipmap
.
but_elect01
:
R
.
mipmap
.
but_elect02
);
mViewBinding
.
cbPoint
.
setButtonDrawable
(
b
?
R
.
mipmap
.
but_elect01
:
R
.
mipmap
.
but_elect02
);
mPresenter
.
changePointState
(
b
);
mPresenter
.
changePointState
(
b
);
});
});
BottomSheetBehavior
.
from
(
mViewBinding
.
llSheet
).
setBottomSheetCallback
(
new
BottomSheetBehavior
.
BottomSheetCallback
()
{
@Override
public
void
onStateChanged
(
@NonNull
View
bottomSheet
,
int
newState
)
{
}
@Override
public
void
onSlide
(
@NonNull
View
bottomSheet
,
float
slideOffset
)
{
mViewBinding
.
tvSettle
.
setAlpha
(
1
-
slideOffset
);
}
});
// init
// init
mPresenter
.
initSettle
();
mPresenter
.
initSettle
();
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailActivity.java
View file @
e2b78a68
...
@@ -4,6 +4,7 @@ package com.xingdata.zzdpos.ui.statistics;
...
@@ -4,6 +4,7 @@ package com.xingdata.zzdpos.ui.statistics;
import
android.app.AlertDialog
;
import
android.app.AlertDialog
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.databinding.DataBindingUtil
;
import
android.databinding.DataBindingUtil
;
import
android.graphics.Paint
;
import
android.util.TimeUtils
;
import
android.util.TimeUtils
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
...
@@ -11,6 +12,7 @@ import android.view.View;
...
@@ -11,6 +12,7 @@ import android.view.View;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.xingdata.api.print.ZX_PrintPOS
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.databinding.ActivityStatisticsDetailBinding
;
import
com.xingdata.zzdpos.databinding.ActivityStatisticsDetailBinding
;
...
@@ -23,6 +25,7 @@ import com.xingdata.zzdpos.model.Saleorder;
...
@@ -23,6 +25,7 @@ import com.xingdata.zzdpos.model.Saleorder;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.main.MainActivity
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
...
@@ -128,6 +131,8 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
...
@@ -128,6 +131,8 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
viewOrderDetailBinding
.
setSumAmt
(
ConvertUtil
.
fenToYuan
(
mSaleorder
.
getOrderAuthAmt
(),
false
));
viewOrderDetailBinding
.
setSumAmt
(
ConvertUtil
.
fenToYuan
(
mSaleorder
.
getOrderAuthAmt
(),
false
));
viewOrderDetailBinding
.
setOperName
(
mSaleorder
.
getOperName
());
viewOrderDetailBinding
.
setOperName
(
mSaleorder
.
getOperName
());
viewOrderDetailBinding
.
setGoodsNum
(
mSaleorder
.
getOrderCnt
()
+
""
);
viewOrderDetailBinding
.
setGoodsNum
(
mSaleorder
.
getOrderCnt
()
+
""
);
if
(
mSaleorder
.
getCutAmt
()
==
null
||
mSaleorder
.
getCutAmt
()
==
0
)
{
if
(
mSaleorder
.
getCutAmt
()
==
null
||
mSaleorder
.
getCutAmt
()
==
0
)
{
viewOrderDetailBinding
.
setCutAmtShow
(
false
);
viewOrderDetailBinding
.
setCutAmtShow
(
false
);
}
else
{
}
else
{
...
@@ -145,7 +150,14 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
...
@@ -145,7 +150,14 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
itemSettleSaledetailBinding
.
tvCount
.
setText
(
saledetail
.
getCnt
());
itemSettleSaledetailBinding
.
tvCount
.
setText
(
saledetail
.
getCnt
());
itemSettleSaledetailBinding
.
tvPrice
.
setText
(
"¥"
+
saledetail
.
getPrice
());
itemSettleSaledetailBinding
.
tvPrice
.
setText
(
"¥"
+
saledetail
.
getPrice
());
itemSettleSaledetailBinding
.
tvName
.
setText
(
saledetail
.
getName
());
itemSettleSaledetailBinding
.
tvName
.
setText
(
saledetail
.
getName
());
// itemSettleSaledetailBinding.tvInitialPrice.setText(saledetail.getpr);
if
(
saledetail
.
isDiscount
())
{
itemSettleSaledetailBinding
.
tvInitialPrice
.
setText
(
ConvertUtil
.
fenToYuan
(
saledetail
.
getSkuPrice
(),
true
));
itemSettleSaledetailBinding
.
tvInitialPrice
.
setVisibility
(
View
.
VISIBLE
);
itemSettleSaledetailBinding
.
tvInitialPrice
.
setPaintFlags
(
itemSettleSaledetailBinding
.
tvInitialPrice
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
}
else
{
itemSettleSaledetailBinding
.
tvInitialPrice
.
setVisibility
(
View
.
GONE
);
}
viewOrderDetailBinding
.
llGoodsList
.
addView
(
view
);
viewOrderDetailBinding
.
llGoodsList
.
addView
(
view
);
}
}
...
@@ -169,6 +181,14 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
...
@@ -169,6 +181,14 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
}
}
});
});
mViewBinding
.
btnPrint
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
ZX_PrintPOS
.
getInstance
(
MainActivity
.
mainActivity
).
print
(
1
,
mSaleorder
);
mViewBinding
.
btnPrint
.
setEnabled
(
false
);
mViewBinding
.
btnPrint
.
setText
(
"已打印"
);
}
});
}
}
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsPresenter.java
View file @
e2b78a68
...
@@ -49,7 +49,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
...
@@ -49,7 +49,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
})
})
.
subscribe
(
orderlist
->
{
.
subscribe
(
orderlist
->
{
fragment
.
setData
(
orderlist
,
orderlist
.
isFirstPage
()
);
fragment
.
setData
(
orderlist
);
},
throwable
->
{
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
});
...
@@ -77,7 +77,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
...
@@ -77,7 +77,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
mView
.
isShowLoading
(
true
);
mView
.
isShowLoading
(
true
);
ApiFactory
.
Rctrace
.
queryRecharge
(
pageNumber
,
nowPageSize
).
doFinally
(()->
mView
.
isShowLoading
(
false
))
ApiFactory
.
Rctrace
.
queryRecharge
(
pageNumber
,
nowPageSize
).
doFinally
(()->
mView
.
isShowLoading
(
false
))
.
subscribe
(
vipRechargeOrderPager
->
{
.
subscribe
(
vipRechargeOrderPager
->
{
msListFragment
.
setData
(
vipRechargeOrderPager
,
vipRechargeOrderPager
.
isFirstPage
()
);
msListFragment
.
setData
(
vipRechargeOrderPager
);
},
throwable
->
{
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
});
...
@@ -104,7 +104,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
...
@@ -104,7 +104,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
mView
.
isShowLoading
(
true
);
mView
.
isShowLoading
(
true
);
ApiFactory
.
Ticket
.
query
(
pageNumber
,
nowPageSize
,
2
).
doFinally
(()->
mView
.
isShowLoading
(
false
))
ApiFactory
.
Ticket
.
query
(
pageNumber
,
nowPageSize
,
2
).
doFinally
(()->
mView
.
isShowLoading
(
false
))
.
subscribe
(
ticketPager
->
{
.
subscribe
(
ticketPager
->
{
msListFragment
.
setData
(
ticketPager
,
ticketPager
.
isFirstPage
()
);
msListFragment
.
setData
(
ticketPager
);
},
throwable
->
{
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
});
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsGroupAdapter.java
deleted
100644 → 0
View file @
18295c54
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
.
adapter
;
import
android.support.v7.widget.RecyclerView
;
import
com.chad.library.adapter.base.BaseSectionQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
java.util.List
;
/**
* Created by Administrator on 2017/12/26.
*/
public
class
StatisticsGroupAdapter
extends
BaseSectionQuickAdapter
<
Saleorder
,
BaseViewHolder
>
{
public
StatisticsGroupAdapter
(
int
layoutResId
,
int
sectionHeadResId
,
List
<
Saleorder
>
data
)
{
super
(
layoutResId
,
sectionHeadResId
,
data
);
}
@Override
protected
void
convertHead
(
com
.
chad
.
library
.
adapter
.
base
.
BaseViewHolder
helper
,
Saleorder
item
)
{
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
Saleorder
item
)
{
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsOrderGroupAdapter.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
.
adapter
;
import
android.widget.ImageView
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseSectionQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
/**
* Created by Administrator on 2017/12/26.
*/
public
class
StatisticsOrderGroupAdapter
extends
BaseSectionQuickAdapter
<
Saleorder
,
BaseViewHolder
>
{
public
StatisticsOrderGroupAdapter
(
List
<
Saleorder
>
data
)
{
super
(
R
.
layout
.
item_statistics
,
R
.
layout
.
item_string_head
,
data
);
}
@Override
protected
void
convertHead
(
BaseViewHolder
helper
,
Saleorder
item
)
{
helper
.
setText
(
R
.
id
.
item_tv
,
item
.
header
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
Saleorder
item
)
{
if
(
item
.
getFirstName
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_left_top
,
item
.
getFirstName
());
}
else
{
helper
.
setText
(
R
.
id
.
tv_left_top
,
item
.
getOrderNo
());
}
if
(
item
.
getOrderPayAmt
()
>
0
)
{
helper
.
setText
(
R
.
id
.
tv_right_top
,
"+"
+
item
.
getPayAmt
());
}
else
{
helper
.
setText
(
R
.
id
.
tv_right_top
,
item
.
getPayAmt
());
}
helper
.
setText
(
R
.
id
.
tv_left_bottom
,
com
.
blankj
.
utilcode
.
util
.
TimeUtils
.
millis2String
(
item
.
getCreateTime
(),
new
SimpleDateFormat
(
StringUtil
.
mmddhhmmmDatePattern
)));
switch
(
item
.
getPayType
())
{
case
C
.
PAY_CHANNEL
.
CASH
:
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
pay_cash
);
break
;
case
C
.
PAY_CHANNEL
.
WECHAT
:
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
pay_wechat
);
break
;
case
C
.
PAY_CHANNEL
.
ALI
:
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
pay_alipay
);
break
;
case
C
.
PAY_CHANNEL
.
BANK
:
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
pay_card
);
break
;
case
C
.
PAY_CHANNEL
.
CARD
:
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
pay_membershipcard
);
break
;
case
C
.
PAY_CHANNEL
.
TALLY
:
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
pay_credit
);
break
;
}
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsRechargeGroupAdapter.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
.
adapter
;
import
android.support.v7.widget.RecyclerView
;
import
android.widget.ImageView
;
import
com.chad.library.adapter.base.BaseSectionQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
/**
* Created by Administrator on 2017/12/26.
*/
public
class
StatisticsRechargeGroupAdapter
extends
BaseSectionQuickAdapter
<
VipRechargeOrder
,
BaseViewHolder
>
{
public
StatisticsRechargeGroupAdapter
(
List
<
VipRechargeOrder
>
data
)
{
super
(
R
.
layout
.
item_statistics
,
R
.
layout
.
item_string_head
,
data
);
}
@Override
protected
void
convertHead
(
com
.
chad
.
library
.
adapter
.
base
.
BaseViewHolder
helper
,
VipRechargeOrder
item
)
{
helper
.
setText
(
R
.
id
.
item_tv
,
item
.
header
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
VipRechargeOrder
item
)
{
helper
.
setText
(
R
.
id
.
tv_left_top
,
item
.
getUserName
());
helper
.
setText
(
R
.
id
.
tv_left_bottom
,
com
.
blankj
.
utilcode
.
util
.
TimeUtils
.
millis2String
(
item
.
getCreateTime
(),
new
SimpleDateFormat
(
StringUtil
.
mmddhhmmmDatePattern
)));
helper
.
setText
(
R
.
id
.
tv_right_top
,
"+"
+
ConvertUtil
.
fenToYuan
(
item
.
getCardAmtPay
(),
false
));
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
ic_text_recharge
);
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/statistics/adapter/StatisticsTicketGroupAdapter.java
0 → 100644
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
.
adapter
;
import
android.widget.ImageView
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseSectionQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
/**
* Created by Administrator on 2017/12/26.
*/
public
class
StatisticsTicketGroupAdapter
extends
BaseSectionQuickAdapter
<
Ticket
,
BaseViewHolder
>
{
public
StatisticsTicketGroupAdapter
(
List
<
Ticket
>
data
)
{
super
(
R
.
layout
.
item_statistics
,
R
.
layout
.
item_string_head
,
data
);
}
@Override
protected
void
convertHead
(
BaseViewHolder
helper
,
Ticket
item
)
{
helper
.
setText
(
R
.
id
.
item_tv
,
item
.
header
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
Ticket
item
)
{
helper
.
setText
(
R
.
id
.
tv_left_top
,
ConvertUtil
.
fenToYuanNoZero
(
item
.
getTicketValAmt
())
+
"元优惠券"
);
helper
.
setText
(
R
.
id
.
tv_left_bottom
,
TimeUtils
.
date2String
(
item
.
getCreateTime
(),
new
SimpleDateFormat
(
StringUtil
.
mmddhhmmmDatePattern
)));
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_left
)).
setImageResource
(
R
.
mipmap
.
ic_text_ticket
);
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/StatisticsTitleFragment.java
View file @
e2b78a68
...
@@ -225,7 +225,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
...
@@ -225,7 +225,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
return
true
;
return
true
;
}
}
if
(
mTicketSearchFragment
.
isAdded
())
{
if
(
mTicketSearchFragment
.
isAdded
())
{
FragmentUtils
.
remove
(
m
Recharge
SearchFragment
);
FragmentUtils
.
remove
(
m
Ticket
SearchFragment
);
return
true
;
return
true
;
}
}
mViewBinding
.
icTitle
.
edTitle
.
setText
(
""
);
mViewBinding
.
icTitle
.
edTitle
.
setText
(
""
);
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/MsMainFragment.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
.
fragment
.
ms
;
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
.
fragment
.
ms
;
import
android.databinding.DataBindingUtil
;
import
android.graphics.Typeface
;
import
android.support.design.widget.TabLayout
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.TextView
;
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.FragmentMsMainBinding
;
import
com.xingdata.zzdpos.databinding.FragmentMsMainBinding
;
import
com.xingdata.zzdpos.databinding.ItemMenuBottomBinding
;
import
com.xingdata.zzdpos.databinding.ItemStringBinding
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
com.xingdata.zzdpos.ui.main.adapter.FragmentViewAdapter
;
import
com.xingdata.zzdpos.ui.main.adapter.FragmentViewAdapter
;
...
@@ -11,9 +20,16 @@ import java.util.ArrayList;
...
@@ -11,9 +20,16 @@ import java.util.ArrayList;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
public
class
MsMainFragment
extends
BaseFragment
<
MainPresenter
,
FragmentMsMainBinding
>
{
public
class
MsMainFragment
extends
BaseFragment
<
MainPresenter
,
FragmentMsMainBinding
>
{
private
int
[]
titleInts
=
{
R
.
string
.
statistics_menu_ms_recharge
,
R
.
string
.
statistics_menu_ms_usedTicket
};
private
FragmentViewAdapter
mFragmentStateAdapter
;
private
FragmentViewAdapter
mFragmentStateAdapter
;
private
List
<
Long
>
dateLongs
=
new
ArrayList
<>();
private
List
<
Long
>
dateLongs
=
new
ArrayList
<>();
private
List
<
BaseFragment
>
fragments
=
new
ArrayList
<>();
private
List
<
BaseFragment
>
fragments
=
new
ArrayList
<>();
...
@@ -57,7 +73,60 @@ public class MsMainFragment extends BaseFragment<MainPresenter, FragmentMsMainBi
...
@@ -57,7 +73,60 @@ public class MsMainFragment extends BaseFragment<MainPresenter, FragmentMsMainBi
},
1
);
},
1
);
}
}
initTab
();
}
private
void
initTab
()
{
Observable
.
create
(
new
ObservableOnSubscribe
<
View
>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
View
>
e
)
throws
Exception
{
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
}
}).
subscribeOn
(
Schedulers
.
newThread
()).
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
new
Consumer
<
View
>()
{
int
i
=
0
;
@Override
public
void
accept
(
View
view
)
throws
Exception
{
ItemStringBinding
itemMenuBottomBinding
=
DataBindingUtil
.
bind
(
view
);
if
(
i
==
0
)
{
itemMenuBottomBinding
.
itemTv
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
}
itemMenuBottomBinding
.
itemTv
.
setText
(
titleInts
[
i
]);
itemMenuBottomBinding
.
itemTv
.
setPadding
(
0
,
0
,
0
,
0
);
mViewBinding
.
tabLayout
.
getTabAt
(
i
).
setCustomView
(
view
);
i
++;
}
});
mViewBinding
.
tabLayout
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
@Override
public
void
onTabSelected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
textView
.
setText
(
tab
.
getText
());
}
@Override
public
void
onTabUnselected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
));
textView
.
setText
(
tab
.
getText
());
}
@Override
public
void
onTabReselected
(
TabLayout
.
Tab
tab
)
{
}
});
}
}
public
int
getTabItem
()
{
public
int
getTabItem
()
{
return
mViewBinding
.
tabLayout
.
getSelectedTabPosition
();
return
mViewBinding
.
tabLayout
.
getSelectedTabPosition
();
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/RechargeListFragment.java
View file @
e2b78a68
...
@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
...
@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
import
android.view.View
;
import
android.view.View
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
...
@@ -14,14 +15,23 @@ import com.xingdata.zzdpos.model.Pager;
...
@@ -14,14 +15,23 @@ import com.xingdata.zzdpos.model.Pager;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.model.VipRechargeOrder
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity
;
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.StatisticsRechargeAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Action
;
import
io.reactivex.schedulers.Schedulers
;
public
class
RechargeListFragment
extends
BaseFragment
<
StatisticsPresenter
,
FragmentMsListBinding
>
{
public
class
RechargeListFragment
extends
BaseFragment
<
StatisticsPresenter
,
FragmentMsListBinding
>
{
private
StatisticsRecharge
Adapter
mStatisticsRecharge
Adapter
;
private
StatisticsRecharge
GroupAdapter
mStatisticsGroup
Adapter
;
private
int
pagerNum
;
private
int
pagerNum
;
private
String
monthDate
;
@Override
@Override
...
@@ -33,30 +43,36 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
...
@@ -33,30 +43,36 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
public
void
initView
()
{
public
void
initView
()
{
pagerNum
=
1
;
pagerNum
=
1
;
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty_recharge
);
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty_recharge
);
if
(
mStatistics
Recharge
Adapter
==
null
)
{
if
(
mStatistics
Group
Adapter
==
null
)
{
mStatistics
RechargeAdapter
=
new
StatisticsRecharge
Adapter
(
new
ArrayList
<>());
mStatistics
GroupAdapter
=
new
StatisticsRechargeGroup
Adapter
(
new
ArrayList
<>());
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Recharge
Adapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Group
Adapter
);
}
else
{
}
else
{
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Recharge
Adapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Group
Adapter
);
}
}
mStatistics
Recharge
Adapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
mStatistics
Group
Adapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Intent
intent
=
new
Intent
(
getActivity
(),
StatisticsDetailActivity
.
class
);
if
(!
mStatisticsGroupAdapter
.
getData
().
get
(
position
).
isHeader
)
{
intent
.
putExtra
(
VipRechargeOrder
.
class
.
getName
(),
mStatisticsRechargeAdapter
.
getData
().
get
(
position
));
Intent
intent
=
new
Intent
(
getActivity
(),
StatisticsDetailActivity
.
class
);
ActivityUtils
.
startActivity
(
intent
);
intent
.
putExtra
(
VipRechargeOrder
.
class
.
getName
(),
mStatisticsGroupAdapter
.
getData
().
get
(
position
));
ActivityUtils
.
startActivity
(
intent
);
}
}
}
});
});
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mStatistics
Recharge
Adapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mStatistics
Group
Adapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mPresenter
.
getRechargeList
(
pagerNum
,
this
);
mPresenter
.
getRechargeList
(
pagerNum
,
this
);
}
}
private
void
onRefresh
()
{
private
void
onRefresh
()
{
...
@@ -78,15 +94,15 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
...
@@ -78,15 +94,15 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
*/
*/
public
void
setData
(
Pager
<
VipRechargeOrder
>
pager
,
boolean
isRefresh
)
{
public
void
setData
(
Pager
<
VipRechargeOrder
>
pager
,
boolean
isRefresh
)
{
if
(
isRefresh
)
{
if
(
isRefresh
)
{
mStatistics
Recharge
Adapter
.
setEnableLoadMore
(
true
);
mStatistics
Group
Adapter
.
setEnableLoadMore
(
true
);
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
}
}
if
(
isRefresh
)
mStatistics
Recharge
Adapter
.
setNewData
(
pager
.
getList
());
if
(
isRefresh
)
mStatistics
Group
Adapter
.
setNewData
(
pager
.
getList
());
else
if
(
pager
.
getList
().
size
()
>
0
)
mStatistics
Recharge
Adapter
.
addData
(
pager
.
getList
());
else
if
(
pager
.
getList
().
size
()
>
0
)
mStatistics
Group
Adapter
.
addData
(
pager
.
getList
());
if
(
pager
.
isLastPage
())
mStatistics
Recharge
Adapter
.
loadMoreEnd
(
isRefresh
);
if
(
pager
.
isLastPage
())
mStatistics
Group
Adapter
.
loadMoreEnd
(
isRefresh
);
else
mStatistics
Recharge
Adapter
.
loadMoreComplete
();
else
mStatistics
Group
Adapter
.
loadMoreComplete
();
if
(
mStatistics
Recharge
Adapter
.
getData
().
size
()
==
0
)
{
if
(
mStatistics
Group
Adapter
.
getData
().
size
()
==
0
)
{
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
statisticsRecycler
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
statisticsRecycler
.
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
...
@@ -95,9 +111,44 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
...
@@ -95,9 +111,44 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
}
}
}
}
public
void
setData
(
Pager
<
VipRechargeOrder
>
pager
)
{
if
(
pager
.
isFirstPage
())
{
monthDate
=
""
;
}
io
.
reactivex
.
Observable
.
create
(
new
ObservableOnSubscribe
<
Pager
<
VipRechargeOrder
>>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
Pager
<
VipRechargeOrder
>>
e
)
throws
Exception
{
for
(
int
i
=
0
;
i
<
pager
.
getList
().
size
();
i
++)
{
String
m
=
TimeUtils
.
millis2String
(
pager
.
getList
().
get
(
i
).
getCreateTime
(),
new
SimpleDateFormat
(
StringUtil
.
defaultDatePattern
));
if
(!
m
.
equals
(
monthDate
))
{
monthDate
=
m
;
pager
.
getList
().
add
(
i
,
new
VipRechargeOrder
(
true
,
monthDate
+
""
));
i
++;
}
}
e
.
onComplete
();
}
}).
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
doOnComplete
(
new
Action
()
{
@Override
public
void
run
()
throws
Exception
{
setData
(
pager
,
pager
.
isFirstPage
());
}
}).
subscribe
();
}
@Override
@Override
public
String
getTabTitle
()
{
public
String
getTabTitle
()
{
return
"充值记录"
;
return
"充值记录"
;
}
}
@Override
public
void
onDestroy
()
{
super
.
onDestroy
();
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/UsedTicketListFragment.java
View file @
e2b78a68
...
@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
...
@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
import
android.view.View
;
import
android.view.View
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
...
@@ -14,17 +15,25 @@ import com.xingdata.zzdpos.model.Pager;
...
@@ -14,17 +15,25 @@ import com.xingdata.zzdpos.model.Pager;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity
;
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.StatisticsTicketAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Action
;
import
io.reactivex.schedulers.Schedulers
;
public
class
UsedTicketListFragment
extends
BaseFragment
<
StatisticsPresenter
,
FragmentMsListBinding
>
{
public
class
UsedTicketListFragment
extends
BaseFragment
<
StatisticsPresenter
,
FragmentMsListBinding
>
{
private
StatisticsTicket
Adapter
mStatisticsTicket
Adapter
;
private
StatisticsTicket
GroupAdapter
mStatisticsGroup
Adapter
;
private
int
pagerNum
;
private
int
pagerNum
;
private
String
monthDate
;
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
...
@@ -36,27 +45,30 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
...
@@ -36,27 +45,30 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
pagerNum
=
1
;
pagerNum
=
1
;
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty_ticket
);
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty_ticket
);
if
(
mStatistics
Ticket
Adapter
==
null
)
{
if
(
mStatistics
Group
Adapter
==
null
)
{
mStatistics
TicketAdapter
=
new
StatisticsTicket
Adapter
(
new
ArrayList
<>());
mStatistics
GroupAdapter
=
new
StatisticsTicketGroup
Adapter
(
new
ArrayList
<>());
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Ticket
Adapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Group
Adapter
);
}
else
{
}
else
{
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Ticket
Adapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatistics
Group
Adapter
);
}
}
mStatistics
Ticket
Adapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
mStatistics
Group
Adapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Intent
intent
=
new
Intent
(
getActivity
(),
StatisticsDetailActivity
.
class
);
if
(!
mStatisticsGroupAdapter
.
getData
().
get
(
position
).
isHeader
)
{
intent
.
putExtra
(
Ticket
.
class
.
getName
(),
mStatisticsTicketAdapter
.
getData
().
get
(
position
));
Intent
intent
=
new
Intent
(
getActivity
(),
StatisticsDetailActivity
.
class
);
ActivityUtils
.
startActivity
(
intent
);
intent
.
putExtra
(
Ticket
.
class
.
getName
(),
mStatisticsGroupAdapter
.
getData
().
get
(
position
));
ActivityUtils
.
startActivity
(
intent
);
}
}
}
});
});
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mStatistics
Ticket
Adapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mStatistics
Group
Adapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mPresenter
.
getTicketList
(
pagerNum
,
this
);
mPresenter
.
getTicketList
(
pagerNum
,
this
);
}
}
...
@@ -80,15 +92,15 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
...
@@ -80,15 +92,15 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
*/
*/
public
void
setData
(
Pager
<
Ticket
>
pager
,
boolean
isRefresh
)
{
public
void
setData
(
Pager
<
Ticket
>
pager
,
boolean
isRefresh
)
{
if
(
isRefresh
)
{
if
(
isRefresh
)
{
mStatistics
Ticket
Adapter
.
setEnableLoadMore
(
true
);
mStatistics
Group
Adapter
.
setEnableLoadMore
(
true
);
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
mViewBinding
.
srlProduct
.
setRefreshing
(
false
);
}
}
if
(
isRefresh
)
mStatistics
Ticket
Adapter
.
setNewData
(
pager
.
getList
());
if
(
isRefresh
)
mStatistics
Group
Adapter
.
setNewData
(
pager
.
getList
());
else
if
(
pager
.
getList
().
size
()
>
0
)
mStatistics
Ticket
Adapter
.
addData
(
pager
.
getList
());
else
if
(
pager
.
getList
().
size
()
>
0
)
mStatistics
Group
Adapter
.
addData
(
pager
.
getList
());
if
(
pager
.
isLastPage
())
mStatistics
Ticket
Adapter
.
loadMoreEnd
(
isRefresh
);
if
(
pager
.
isLastPage
())
mStatistics
Group
Adapter
.
loadMoreEnd
(
isRefresh
);
else
mStatistics
Ticket
Adapter
.
loadMoreComplete
();
else
mStatistics
Group
Adapter
.
loadMoreComplete
();
if
(
mStatistics
Ticket
Adapter
.
getData
().
size
()
==
0
)
{
if
(
mStatistics
Group
Adapter
.
getData
().
size
()
==
0
)
{
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
llEmpty
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
statisticsRecycler
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
statisticsRecycler
.
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
...
@@ -97,6 +109,36 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
...
@@ -97,6 +109,36 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
}
}
}
}
public
void
setData
(
Pager
<
Ticket
>
pager
)
{
if
(
pager
.
isFirstPage
())
{
monthDate
=
""
;
}
io
.
reactivex
.
Observable
.
create
(
new
ObservableOnSubscribe
<
Pager
<
Ticket
>>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
Pager
<
Ticket
>>
e
)
throws
Exception
{
for
(
int
i
=
0
;
i
<
pager
.
getList
().
size
();
i
++)
{
String
m
=
TimeUtils
.
date2String
(
pager
.
getList
().
get
(
i
).
getCreateTime
(),
new
SimpleDateFormat
(
StringUtil
.
defaultDatePattern
));
if
(!
m
.
equals
(
monthDate
))
{
monthDate
=
m
;
pager
.
getList
().
add
(
i
,
new
Ticket
(
true
,
monthDate
+
""
));
i
++;
}
}
e
.
onComplete
();
}
}).
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
doOnComplete
(
new
Action
()
{
@Override
public
void
run
()
throws
Exception
{
setData
(
pager
,
pager
.
isFirstPage
());
}
}).
subscribe
();
}
@Override
@Override
public
String
getTabTitle
()
{
public
String
getTabTitle
()
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderListFragment.java
View file @
e2b78a68
...
@@ -8,6 +8,7 @@ import android.view.View;
...
@@ -8,6 +8,7 @@ import android.view.View;
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.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
...
@@ -21,18 +22,29 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
...
@@ -21,18 +22,29 @@ 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.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Action
;
import
io.reactivex.schedulers.Schedulers
;
public
class
OrderListFragment
extends
BaseFragment
<
StatisticsPresenter
,
FragmentOrderListBinding
>
{
public
class
OrderListFragment
extends
BaseFragment
<
StatisticsPresenter
,
FragmentOrderListBinding
>
{
private
StatisticsOrderAdapter
mStatisticsAdapter
;
private
StatisticsOrder
Group
Adapter
mStatisticsAdapter
;
private
Long
monthDateStart
;
private
Long
monthDateStart
;
private
Long
monthDateEnd
;
private
Long
monthDateEnd
;
private
int
pagerNum
;
private
int
pagerNum
;
private
String
monthDate
;
public
OrderListFragment
setDate
(
Long
end
,
Long
start
)
{
public
OrderListFragment
setDate
(
Long
end
,
Long
start
)
{
monthDateStart
=
start
;
monthDateStart
=
start
;
...
@@ -49,27 +61,27 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -49,27 +61,27 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
pagerNum
=
1
;
pagerNum
=
1
;
Calendar
calendar
=
Calendar
.
getInstance
();
//
Calendar calendar = Calendar.getInstance();
//获得当前时间的月份,月份从0开始所以结果要加1
//
//
获得当前时间的月份,月份从0开始所以结果要加1
int
monthNow
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
//
int monthNow = calendar.get(Calendar.MONTH) + 1;
calendar
.
setTimeInMillis
(
monthDateStart
);
//
calendar.setTimeInMillis(monthDateStart);
int
monthStart
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
//
int monthStart = calendar.get(Calendar.MONTH) + 1;
if
(
monthStart
==
monthNow
)
{
//
if (monthStart == monthNow) {
mViewBinding
.
setMonth
(
"本月"
);
//
mViewBinding.setMonth("本月");
}
else
{
//
} else {
mViewBinding
.
setMonth
(
monthStart
+
"月"
);
//
mViewBinding.setMonth(monthStart + "月");
}
//
}
mViewBinding
.
setAmt
(
"收入:¥230.00"
);
//
mViewBinding.setAmt("收入:¥230.00");
mViewBinding
.
llTitle
.
setOnClickListener
(
new
OnClickListener
()
{
//
mViewBinding.llTitle.setOnClickListener(new OnClickListener() {
@Override
//
@Override
protected
void
myOnClickListener
(
View
v
)
{
//
protected void myOnClickListener(View v) {
pop
();
//
pop();
}
//
}
});
//
});
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty
);
mViewBinding
.
tvEmpty
.
setText
(
R
.
string
.
statistics_search_empty
);
if
(
mStatisticsAdapter
==
null
)
{
if
(
mStatisticsAdapter
==
null
)
{
mStatisticsAdapter
=
new
StatisticsOrderAdapter
(
new
ArrayList
<>());
mStatisticsAdapter
=
new
StatisticsOrder
Group
Adapter
(
new
ArrayList
<>());
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
...
@@ -128,4 +140,36 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -128,4 +140,36 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
mViewBinding
.
statisticsRecycler
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
statisticsRecycler
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
}
public
void
setData
(
Pager
<
Saleorder
>
pager
)
{
if
(
pager
.
isFirstPage
())
{
monthDate
=
""
;
}
io
.
reactivex
.
Observable
.
create
(
new
ObservableOnSubscribe
<
Pager
<
Saleorder
>>()
{
@Override
public
void
subscribe
(
ObservableEmitter
<
Pager
<
Saleorder
>>
e
)
throws
Exception
{
for
(
int
i
=
0
;
i
<
pager
.
getList
().
size
();
i
++)
{
String
m
=
TimeUtils
.
millis2String
(
pager
.
getList
().
get
(
i
).
getCreateTime
(),
new
SimpleDateFormat
(
StringUtil
.
defaultDatePattern
));
if
(!
m
.
equals
(
monthDate
))
{
monthDate
=
m
;
pager
.
getList
().
add
(
i
,
new
Saleorder
(
true
,
monthDate
+
""
));
i
++;
}
}
e
.
onComplete
();
}
}).
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
doOnComplete
(
new
Action
()
{
@Override
public
void
run
()
throws
Exception
{
setData
(
pager
,
pager
.
isFirstPage
());
}
}).
subscribe
();
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
View file @
e2b78a68
...
@@ -163,7 +163,7 @@ interface StoreContract {
...
@@ -163,7 +163,7 @@ interface StoreContract {
* @param sku 商品
* @param sku 商品
* @param <Sku> 商品类型
* @param <Sku> 商品类型
*/
*/
public
abstract
<
Sku
extends
BaseSku
>
void
clickAddSku
(
Sku
sku
);
public
abstract
<
Sku
extends
BaseSku
>
void
clickAddSku
(
Sku
sku
,
int
value
);
/**
/**
* 商店页面 - 点击删除商品
* 商店页面 - 点击删除商品
...
@@ -171,7 +171,7 @@ interface StoreContract {
...
@@ -171,7 +171,7 @@ interface StoreContract {
* @param sku 商品
* @param sku 商品
* @param <Sku> 商品类型
* @param <Sku> 商品类型
*/
*/
public
abstract
<
Sku
extends
BaseSku
>
void
clickRemoveSku
(
Sku
sku
);
public
abstract
<
Sku
extends
BaseSku
>
void
clickRemoveSku
(
Sku
sku
,
int
value
);
/**
/**
* 购物车页面 - 购物车发生变化
* 购物车页面 - 购物车发生变化
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
View file @
e2b78a68
...
@@ -126,9 +126,9 @@ public class StorePresenter extends StoreContract.Presenter {
...
@@ -126,9 +126,9 @@ public class StorePresenter extends StoreContract.Presenter {
}
}
@Override
@Override
public
<
Sku
extends
BaseSku
>
void
clickAddSku
(
Sku
sku
)
{
public
<
Sku
extends
BaseSku
>
void
clickAddSku
(
Sku
sku
,
int
value
)
{
//更新购物车信息
//更新购物车信息
updateCart
(
sku
,
1
);
updateCart
(
sku
,
value
);
//发送购物车信息(不需要刷新页面)
//发送购物车信息(不需要刷新页面)
mView
.
loadSaledetails
(
mSaledetails
,
false
);
mView
.
loadSaledetails
(
mSaledetails
,
false
);
//购物车发生变化
//购物车发生变化
...
@@ -136,15 +136,16 @@ public class StorePresenter extends StoreContract.Presenter {
...
@@ -136,15 +136,16 @@ public class StorePresenter extends StoreContract.Presenter {
}
}
@Override
@Override
public
<
Sku
extends
BaseSku
>
void
clickRemoveSku
(
Sku
sku
)
{
public
<
Sku
extends
BaseSku
>
void
clickRemoveSku
(
Sku
sku
,
int
value
)
{
//更新购物车信息
//更新购物车信息
updateCart
(
sku
,
-
1
);
updateCart
(
sku
,
value
);
//发送购物车信息(不需要刷新页面)
//发送购物车信息(不需要刷新页面)
mView
.
loadSaledetails
(
mSaledetails
,
false
);
mView
.
loadSaledetails
(
mSaledetails
,
false
);
//购物车发生变化
//购物车发生变化
this
.
cartChanged
();
this
.
cartChanged
();
}
}
@Override
@Override
public
void
cartChanged
()
{
public
void
cartChanged
()
{
//设置订单信息
//设置订单信息
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/adapter/SkuAdapter.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
adapter
;
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
adapter
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.view.View
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
...
@@ -39,24 +38,22 @@ public class SkuAdapter<T extends BaseSku> extends BaseAdapter<T, ItemStoreSkuBi
...
@@ -39,24 +38,22 @@ public class SkuAdapter<T extends BaseSku> extends BaseAdapter<T, ItemStoreSkuBi
mViewBinding
.
tvName
.
setText
(
item
.
getSpuName
());
mViewBinding
.
tvName
.
setText
(
item
.
getSpuName
());
mViewBinding
.
tvAmt
.
setText
(
ConvertUtil
.
fenToYuan
(
item
.
getSkuRetailPrice1
()));
mViewBinding
.
tvAmt
.
setText
(
ConvertUtil
.
fenToYuan
(
item
.
getSkuRetailPrice1
()));
mViewBinding
.
ivIncrease
.
setOnClickListener
(
view
->
{
mViewBinding
.
ivIncrease
.
setOnClickListener
(
view
->
{
if
(
mViewBinding
.
getCount
()
>=
99
)
return
;
if
(
mViewBinding
.
getCount
()
>=
99
)
return
;
mViewBinding
.
setCount
(
mViewBinding
.
getCount
()
+
1
);
mViewBinding
.
setCount
(
mViewBinding
.
getCount
()
+
1
);
setViewByCount
(
mViewBinding
);
setViewByCount
(
mViewBinding
);
if
(
mOnCountChangeListener
!=
null
)
{
if
(
mOnCountChangeListener
!=
null
)
{
mOnCountChangeListener
.
onCountChange
(
item
,
1
);
mOnCountChangeListener
.
onCountChange
(
mViewBinding
.
ivPic
,
item
,
1
);
}
}
});
});
mViewBinding
.
ivReduce
.
setOnClickListener
(
view
->
{
mViewBinding
.
ivReduce
.
setOnClickListener
(
view
->
{
mViewBinding
.
setCount
(
mViewBinding
.
getCount
()
-
1
);
mViewBinding
.
setCount
(
mViewBinding
.
getCount
()
-
1
);
setViewByCount
(
mViewBinding
);
setViewByCount
(
mViewBinding
);
if
(
mOnCountChangeListener
!=
null
)
{
if
(
mOnCountChangeListener
!=
null
)
{
mOnCountChangeListener
.
onCountChange
(
item
,
-
1
);
mOnCountChangeListener
.
onCountChange
(
mViewBinding
.
ivPic
,
item
,
-
1
);
}
}
});
});
mViewBinding
.
setCount
(
0
);
mViewBinding
.
setCount
(
0
);
for
(
int
i
=
0
;
i
<
mSaledetails
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mSaledetails
.
size
();
i
++)
{
if
(
mSaledetails
.
get
(
i
).
getSkuId
().
longValue
()
==
item
.
getSkuId
())
{
if
(
mSaledetails
.
get
(
i
).
getSkuId
().
longValue
()
==
item
.
getSkuId
())
{
...
@@ -77,12 +74,6 @@ public class SkuAdapter<T extends BaseSku> extends BaseAdapter<T, ItemStoreSkuBi
...
@@ -77,12 +74,6 @@ public class SkuAdapter<T extends BaseSku> extends BaseAdapter<T, ItemStoreSkuBi
mViewBinding
.
ivReduce
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
ivReduce
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvCount
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvCount
.
setVisibility
(
View
.
GONE
);
}
}
}
@Override
public
void
setOnItemClickListener
(
@Nullable
OnItemClickListener
listener
)
{
super
.
setOnItemClickListener
(
listener
);
}
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/store/adapter/SkugrpAdapter.java
View file @
e2b78a68
...
@@ -3,19 +3,19 @@ package com.xingdata.zzdpos.ui.store.adapter;
...
@@ -3,19 +3,19 @@ package com.xingdata.zzdpos.ui.store.adapter;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseSelectedAdapter
;
import
com.xingdata.zzdpos.base.BaseSelectedAdapter
;
import
com.xingdata.zzdpos.base.BaseViewHolder
;
import
com.xingdata.zzdpos.base.BaseViewHolder
;
import
com.xingdata.zzdpos.databinding.ItemS
toreSkugrp
Binding
;
import
com.xingdata.zzdpos.databinding.ItemS
elector
Binding
;
import
com.xingdata.zzdpos.model.Sskugrp
;
import
com.xingdata.zzdpos.model.Sskugrp
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
public
class
SkugrpAdapter
extends
BaseSelectedAdapter
<
Sskugrp
,
ItemS
toreSkugrp
Binding
>
{
public
class
SkugrpAdapter
extends
BaseSelectedAdapter
<
Sskugrp
,
ItemS
elector
Binding
>
{
public
SkugrpAdapter
()
{
public
SkugrpAdapter
()
{
super
(
R
.
layout
.
item_s
tore_skugrp
,
new
ArrayList
<>(),
false
);
super
(
R
.
layout
.
item_s
elector
,
new
ArrayList
<>(),
false
);
}
}
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ItemS
toreSkugrp
Binding
mViewBinding
,
Sskugrp
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
ItemS
elector
Binding
mViewBinding
,
Sskugrp
item
)
{
mViewBinding
.
setSelected
(
getSelectedPosition
()
==
helper
.
getAdapterPosition
());
mViewBinding
.
setSelected
(
getSelectedPosition
()
==
helper
.
getAdapterPosition
());
mViewBinding
.
tvName
.
getPaint
().
setFakeBoldText
(
getSelectedPosition
()
==
helper
.
getAdapterPosition
());
mViewBinding
.
tvName
.
getPaint
().
setFakeBoldText
(
getSelectedPosition
()
==
helper
.
getAdapterPosition
());
mViewBinding
.
tvName
.
setText
(
item
.
getSkuGrpName
());
mViewBinding
.
tvName
.
setText
(
item
.
getSkuGrpName
());
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
View file @
e2b78a68
...
@@ -35,9 +35,9 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
...
@@ -35,9 +35,9 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
// set sku listener
// set sku listener
mSkuAdapter
.
setOnLoadMoreListener
(
this
::
loadMoreSku
,
mViewBinding
.
rlSku
);
mSkuAdapter
.
setOnLoadMoreListener
(
this
::
loadMoreSku
,
mViewBinding
.
rlSku
);
mSkuAdapter
.
setOnCountChangeListener
((
sku
,
value
)
->
{
mSkuAdapter
.
setOnCountChangeListener
((
view
,
sku
,
value
)
->
{
if
(
value
>
0
)
mPresenter
.
clickAddSku
(
sku
);
if
(
value
>
0
)
mPresenter
.
clickAddSku
(
sku
,
value
);
else
mPresenter
.
clickRemoveSku
(
sku
);
else
mPresenter
.
clickRemoveSku
(
sku
,
value
);
});
});
// set empty
// set empty
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
View file @
e2b78a68
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
fragment
;
package
com
.
xingdata
.
zzdpos
.
ui
.
store
.
fragment
;
import
android.animation.Animator
;
import
android.animation.ValueAnimator
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.graphics.Path
;
import
android.graphics.PathMeasure
;
import
android.support.constraint.ConstraintLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
android.view.View
;
import
android.view.animation.LinearInterpolator
;
import
android.widget.ImageView
;
import
com.blankj.utilcode.util.ScreenUtils
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
...
@@ -26,10 +34,12 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
...
@@ -26,10 +34,12 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
private
SkugrpAdapter
mSkugrpAdapter
;
private
SkugrpAdapter
mSkugrpAdapter
;
private
SkuAdapter
mSkuAdapter
;
private
SkuAdapter
mSkuAdapter
;
public
interface
OnCountChangeListener
{
public
interface
OnCountChangeListener
{
void
onCountChange
(
BaseSku
sku
,
int
value
);
void
onCountChange
(
View
view
,
BaseSku
sku
,
int
value
);
}
}
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_store
;
return
R
.
layout
.
fragment_store
;
...
@@ -50,11 +60,11 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
...
@@ -50,11 +60,11 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
// set sku listener
// set sku listener
mViewBinding
.
srlSku
.
setOnRefreshListener
(
this
::
refreshSku
);
mViewBinding
.
srlSku
.
setOnRefreshListener
(
this
::
refreshSku
);
mSkuAdapter
.
setOnLoadMoreListener
(
this
::
loadMoreSku
,
mViewBinding
.
rlSku
);
mSkuAdapter
.
setOnLoadMoreListener
(
this
::
loadMoreSku
,
mViewBinding
.
rlSku
);
mSkuAdapter
.
setOnCountChangeListener
((
sku
,
value
)
->
{
mSkuAdapter
.
setOnCountChangeListener
((
view
,
sku
,
value
)
->
{
if
(
value
>
0
)
mPresenter
.
clickAddSku
(
sku
);
if
(
value
>
0
)
this
.
clickAdd
(
view
,
sku
,
value
);
else
mPresenter
.
clickRemoveSku
(
sku
);
else
mPresenter
.
clickRemoveSku
(
sku
,
value
);
});
});
// set grp listener
// set grp listener
mSkugrpAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
mPresenter
.
clickSkugrp
(
mSkugrpAdapter
.
getData
().
get
(
position
)));
mSkugrpAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
mPresenter
.
clickSkugrp
(
mSkugrpAdapter
.
getData
().
get
(
position
)));
...
@@ -71,6 +81,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
...
@@ -71,6 +81,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
mPresenter
.
initStore
();
mPresenter
.
initStore
();
}
}
/**
/**
* 刷新商品
* 刷新商品
*/
*/
...
@@ -218,4 +229,97 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
...
@@ -218,4 +229,97 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
}
}
/**
* 点击添加按钮
*
* @param view 按钮
* @param sku 商品信息
* @param value 数量
*/
private
void
clickAdd
(
View
view
,
BaseSku
sku
,
int
value
)
{
// 路径测量
PathMeasure
mPathMeasure
;
// 贝塞尔曲线中间过程点坐标
float
[]
mCurrentPosition
=
new
float
[
2
];
final
ImageView
icon
=
new
ImageView
(
mContext
);
icon
.
setImageDrawable
(((
ImageView
)
view
).
getDrawable
());
ConstraintLayout
.
LayoutParams
params
=
new
ConstraintLayout
.
LayoutParams
(
view
.
getWidth
(),
view
.
getHeight
());
mViewBinding
.
clStore
.
addView
(
icon
,
params
);
int
[]
parentLocation
=
new
int
[
2
];
mViewBinding
.
clStore
.
getLocationInWindow
(
parentLocation
);
int
startLoc
[]
=
new
int
[
2
];
view
.
getLocationInWindow
(
startLoc
);
// 得到购物车图片的坐标(用于计算动画结束后的坐标)
int
endLoc
[]
=
new
int
[]{
0
,
ScreenUtils
.
getScreenHeight
()};
float
startX
=
startLoc
[
0
]
-
parentLocation
[
0
];
float
startY
=
startLoc
[
1
]
-
parentLocation
[
1
];
// 商品掉落后的终点坐标:购物车起始点-父布局起始点+购物车图片的1/5
float
toX
=
endLoc
[
0
]
-
parentLocation
[
0
];
float
toY
=
endLoc
[
1
]
-
parentLocation
[
1
];
// 开始绘制贝塞尔曲线
Path
path
=
new
Path
();
// 移动到起始点(贝塞尔曲线的起点)
path
.
moveTo
(
startX
,
startY
);
// 使用二阶贝塞尔曲线:注意第一个起始坐标越大,贝塞尔曲线的横向距离就会越大,一般按照下面的式子取即可
path
.
quadTo
((
startX
+
toX
)
/
2
,
startY
,
toX
,
toY
);
// mPathMeasure用来计算贝塞尔曲线的曲线长度和贝塞尔曲线中间插值的坐标,如果是true,path会形成一个闭环
mPathMeasure
=
new
PathMeasure
(
path
,
false
);
// 属性动画实现(从0到贝塞尔曲线的长度之间进行插值计算,获取中间过程的距离值)
ValueAnimator
valueAnimator
=
ValueAnimator
.
ofFloat
(
0
,
mPathMeasure
.
getLength
());
valueAnimator
.
setDuration
(
500
);
// 匀速线性插值器
valueAnimator
.
setInterpolator
(
new
LinearInterpolator
());
valueAnimator
.
addUpdateListener
(
new
ValueAnimator
.
AnimatorUpdateListener
()
{
@Override
public
void
onAnimationUpdate
(
ValueAnimator
animation
)
{
// 当插值计算进行时,获取中间的每个值,
// 这里这个值是中间过程中的曲线长度(下面根据这个值来得出中间点的坐标值)
float
value
=
(
Float
)
animation
.
getAnimatedValue
();
// 获取当前点坐标封装到mCurrentPosition
// boolean getPosTan(float distance, float[] pos, float[] tan) :
// 传入一个距离distance(0<=distance<=getLength()),然后会计算当前距离的坐标点和切线,pos会自动填充上坐标,这个方法很重要。
// mCurrentPosition此时就是中间距离点的坐标值
mPathMeasure
.
getPosTan
(
value
,
mCurrentPosition
,
null
);
// 移动的商品图片(动画图片)的坐标设置为该中间点的坐标
icon
.
setTranslationX
(
mCurrentPosition
[
0
]);
icon
.
setTranslationY
(
mCurrentPosition
[
1
]);
}
});
// 开始执行动画
valueAnimator
.
start
();
// 动画结束后的处理
valueAnimator
.
addListener
(
new
Animator
.
AnimatorListener
()
{
@Override
public
void
onAnimationStart
(
Animator
animation
)
{
}
@Override
public
void
onAnimationEnd
(
Animator
animation
)
{
mPresenter
.
clickAddSku
(
sku
,
value
);
// 把执行动画的商品图片从父布局中移除
mViewBinding
.
clStore
.
removeView
(
icon
);
}
@Override
public
void
onAnimationCancel
(
Animator
animation
)
{
}
@Override
public
void
onAnimationRepeat
(
Animator
animation
)
{
}
});
}
}
}
app/src/main/java/com/xingdata/zzdpos/util/StringUtil.java
View file @
e2b78a68
...
@@ -16,6 +16,7 @@ import java.util.Date;
...
@@ -16,6 +16,7 @@ import java.util.Date;
public
class
StringUtil
{
public
class
StringUtil
{
public
static
String
defaultDatePattern
=
"yyyy-MM-dd"
;
public
static
String
defaultDatePattern
=
"yyyy-MM-dd"
;
public
static
String
mmddhhmmmDatePattern
=
"MM-dd HH:mm"
;
/**
/**
...
...
app/src/main/res/drawable/shape_gray_round_rectangle_stroke.xml
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/all_
shape_
radius"
/>
<corners
android:radius=
"@dimen/all_radius"
/>
<stroke
<stroke
android:width=
"@dimen/edit_border"
android:width=
"@dimen/edit_border"
android:color=
"@color/gary"
/>
android:color=
"@color/gary"
/>
...
...
app/src/main/res/layout/activity_replenishment.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<FrameLayout
android:id=
"@+id/f_bottom"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:background=
"@color/white"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
</FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/activity_statistics_detail.xml
View file @
e2b78a68
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
app:layout_constraintBottom_toBottomOf=
"parent"
>
app:layout_constraintBottom_toBottomOf=
"parent"
>
<Button
<Button
android:id=
"@+id/btn_
cancel
"
android:id=
"@+id/btn_
print
"
style=
"@style/button_passive"
style=
"@style/button_passive"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/dialog_integral_get_setting.xml
View file @
e2b78a68
...
@@ -32,22 +32,10 @@
...
@@ -32,22 +32,10 @@
android:id=
"@+id/ic_title"
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
layout=
"@layout/title"
/>
<Button
android:id=
"@+id/btn_add"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_margin=
"@dimen/all_margin"
android:background=
"@color/red_guanyu"
android:onClick=
"@{OnClickListener}"
android:text=
"确定"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
<ScrollView
<ScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@+id/btn_add"
android:layout_below=
"@+id/ic_title"
>
android:layout_below=
"@+id/ic_title"
>
<LinearLayout
<LinearLayout
...
@@ -680,8 +668,8 @@
...
@@ -680,8 +668,8 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/all_padding_left_right"
android:layout_marginRight=
"@dimen/all_padding_left_right"
android:gravity=
"right"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:gravity=
"right"
android:text=
"个月"
android:text=
"个月"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
...
@@ -692,6 +680,23 @@
...
@@ -692,6 +680,23 @@
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray1"
></View>
android:background=
"@color/gray1"
></View>
<LinearLayout
android:layout_width=
"match_parent"
android:background=
"@color/white"
android:layout_height=
"wrap_content"
>
<Button
android:id=
"@+id/btn_add"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_margin"
android:background=
"@color/red_guanyu"
android:onClick=
"@{OnClickListener}"
android:text=
"确定"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
...
...
app/src/main/res/layout/fragment_casher.xml
View file @
e2b78a68
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:drawableTop=
"@mipmap/icon_receivables"
android:drawableTop=
"@mipmap/icon_receivables"
android:gravity=
"center"
android:gravity=
"center"
android:textSize=
"@dimen/all_sub_title_size"
android:text=
"@string/menu_receivables"
android:text=
"@string/menu_receivables"
android:textColor=
"#FFF"
/>
android:textColor=
"#FFF"
/>
...
@@ -48,6 +49,7 @@
...
@@ -48,6 +49,7 @@
android:drawableTop=
"@mipmap/icon_billing"
android:drawableTop=
"@mipmap/icon_billing"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"@string/menu_billing"
android:text=
"@string/menu_billing"
android:textSize=
"@dimen/all_sub_title_size"
android:textColor=
"#FFF"
/>
android:textColor=
"#FFF"
/>
...
...
app/src/main/res/layout/fragment_ms_editor.xml
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<LinearLayout
<data>
<variable
name=
"name"
type=
"String"
/>
<variable
name=
"dateStart"
type=
"String"
/>
<variable
name=
"dateEnd"
type=
"String"
/>
<variable
name=
"user"
type=
"String"
/>
<variable
name=
"area"
type=
"String"
/>
</data>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:background=
"@color/gray_zhouyu"
>
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
android:text=
"@string/ms_editor_subtitle_info"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_sub_title_size"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_name"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<EditText
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/transparent"
android:hint=
"@string/ms_editor_name_hint"
android:text=
"@{name}"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:orientation=
"horizontal"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_subtitle_time"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_sub_title_size"
/>
<TextView
android:id=
"@+id/tv_time_more"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:foreground=
"?android:attr/selectableItemBackground"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_spacing"
android:text=
"@string/ms_editor_time_more"
android:textColor=
"@color/blue_mawu"
android:textSize=
"@dimen/all_body_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<LinearLayout
android:id=
"@+id/ll_date_start"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_date_start"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/all_margin"
android:drawableEnd=
"@mipmap/createstore_drop_down"
android:gravity=
"center_vertical"
android:text=
"@{dateStart}"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_kongming"
/>
<LinearLayout
android:id=
"@+id/ll_date_end"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_date_end"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/all_margin"
android:drawableEnd=
"@mipmap/createstore_drop_down"
android:gravity=
"center_vertical"
android:text=
"@{dateEnd}"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<ViewStub
android:id=
"@+id/vs_time_detail"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout=
"@layout/view_time_detail"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
android:text=
"@string/ms_editor_subtitle_ms"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_sub_title_size"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<LinearLayout
android:id=
"@+id/ll_user"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_user"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/all_margin"
android:drawableEnd=
"@mipmap/createstore_drop_down"
android:gravity=
"center_vertical"
android:text=
"@{user}"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_kongming"
/>
<LinearLayout
android:id=
"@+id/ll_area"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_area"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/all_margin"
android:drawableEnd=
"@mipmap/createstore_drop_down"
android:gravity=
"center_vertical"
android:text=
"@{area}"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_group"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
<FrameLayout
android:id=
"@+id/f_group"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
/>
<FrameLayout
android:id=
"@+id/f_type"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white_caocao"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginBottom=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
/>
</LinearLayout>
<Button
android:id=
"@+id/btn_confirm"
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"
android:foreground=
"?android:attr/selectableItemBackground"
android:text=
"@string/all_confirm"
android:textColor=
"@color/white_caocao"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_ms_list.xml
View file @
e2b78a68
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
android:id=
"@+id/srl_product"
android:id=
"@+id/srl_product"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"@dimen/all_padding"
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"
...
...
app/src/main/res/layout/fragment_ms_main.xml
View file @
e2b78a68
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
android:background=
"@color/white_caocao"
android:background=
"@color/white_caocao"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:tabIndicatorColor=
"@color/red_lvzhi"
app:tabIndicatorColor=
"@color/red_lvzhi"
app:tabIndicatorHeight=
"@dimen/view_line_L2"
>
app:tabIndicatorHeight=
"@dimen/view_line_L2"
app:tabTextColor=
"@color/black_baozheng"
>
</android.support.design.widget.TabLayout>
</android.support.design.widget.TabLayout>
...
...
app/src/main/res/layout/fragment_myself.xml
View file @
e2b78a68
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{opername}"
android:text=
"@{opername}"
android:textColor=
"@color/white_caocao"
android:textColor=
"@color/white_caocao"
android:textSize=
"@dimen/
big
_text_size"
/>
android:textSize=
"@dimen/
all
_text_size"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
android:layout_marginStart=
"@dimen/all_padding"
android:layout_marginStart=
"@dimen/all_padding"
android:text=
"@{phone}"
android:text=
"@{phone}"
android:textColor=
"@color/white_caocao"
android:textColor=
"@color/white_caocao"
android:textSize=
"@dimen/
small_text_size
"
/>
android:textSize=
"@dimen/
all_text_size_small
"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{address}"
android:text=
"@{address}"
android:textColor=
"@color/white_caocao"
android:textColor=
"@color/white_caocao"
android:textSize=
"@dimen/
small_text_size
"
/>
android:textSize=
"@dimen/
all_text_size_small
"
/>
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/fragment_order_list.xml
View file @
e2b78a68
...
@@ -24,33 +24,33 @@
...
@@ -24,33 +24,33 @@
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<
LinearLayout
<
!--<LinearLayout-->
android:id=
"@+id/ll_title"
<!--android:id="@+id/ll_title"-->
android:layout_width=
"match_parent"
<!--android:layout_width="match_parent"-->
android:layout_height=
"wrap_content"
<!--android:layout_height="wrap_content"-->
android:orientation=
"horizontal"
<!--android:orientation="horizontal"-->
android:weightSum=
"2"
<!--android:weightSum="2"-->
app:layout_constraintEnd_toEndOf=
"parent"
<!--app:layout_constraintEnd_toEndOf="parent"-->
app:layout_constraintStart_toStartOf=
"parent"
<!--app:layout_constraintStart_toStartOf="parent"-->
app:layout_constraintTop_toTopOf=
"parent"
>
<!--app:layout_constraintTop_toTopOf="parent">--
>
<
TextView
<
!--<TextView-->
android:layout_width=
"0dp"
<!--android:layout_width="0dp"-->
android:layout_height=
"wrap_content"
<!--android:layout_height="wrap_content"-->
android:layout_weight=
"1"
<!--android:layout_weight="1"-->
android:gravity=
"left"
<!--android:gravity="left"-->
android:padding=
"@dimen/all_padding"
<!--android:padding="@dimen/all_padding"-->
android:text=
"@{month}"
/
>
<!--android:text="@{month}" />--
>
<
TextView
<
!--<TextView-->
android:layout_width=
"0dp"
<!--android:layout_width="0dp"-->
android:layout_height=
"wrap_content"
<!--android:layout_height="wrap_content"-->
android:layout_weight=
"1"
<!--android:layout_weight="1"-->
android:gravity=
"right"
<!--android:gravity="right"-->
android:padding=
"@dimen/all_padding"
<!--android:padding="@dimen/all_padding"-->
android:text=
"@{amt}"
<!--android:text="@{amt}"-->
android:visibility=
"invisible"
/
>
<!--android:visibility="invisible" />--
>
<
/LinearLayout
>
<
!--</LinearLayout>--
>
<android.support.v4.widget.SwipeRefreshLayout
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_product"
android:id=
"@+id/srl_product"
...
...
app/src/main/res/layout/fragment_pay_result.xml
View file @
e2b78a68
...
@@ -157,12 +157,16 @@
...
@@ -157,12 +157,16 @@
<Button
<Button
android:id=
"@+id/btn_confirm"
android:id=
"@+id/btn_confirm"
style=
"@style/button_positive"
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_marginEnd=
"@dimen/all_margin"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@drawable/shape_red_r1"
android:foreground=
"?android:attr/selectableItemBackground"
android:foreground=
"?android:attr/selectableItemBackground"
android:text=
"@{payResult?@string/settle_complete:@string/settle_retry}"
/>
android:text=
"@{payResult?@string/settle_complete:@string/settle_retry}"
android:textColor=
"@color/white_caocao"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_replenishement.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:tools=
"http://schemas.android.com/tools"
>
<data>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white_caocao"
android:orientation=
"vertical"
android:splitMotionEvents=
"false"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title_order"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"?android:attr/selectableItemBackground"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/btn_add"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawablePadding=
"@dimen/dp_4"
android:drawableStart=
"@mipmap/but_add"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
android:text=
"@string/manage_replenishment_add"
android:textColor=
"@color/red_lvzhi"
android:textSize=
"@dimen/big_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
/>
<android.support.design.widget.TabLayout
android:id=
"@+id/tab"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:tabMinWidth=
"150dp"
app:tabTextColor=
"@color/black_baozheng"
>
</android.support.design.widget.TabLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_margin"
android:background=
"@color/gray_zhouyu"
/>
<android.support.v4.view.ViewPager
android:id=
"@+id/fragment_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_replenishement_detail.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"sumNum"
type=
"String"
/>
<variable
name=
"finallyPrice"
type=
"String"
/>
<variable
name=
"isShowSupplier"
type=
"Boolean"
/>
<variable
name=
"shopOderName"
type=
"String"
/>
<variable
name=
"shopName"
type=
"String"
/>
<variable
name=
"shopAddress"
type=
"String"
/>
<variable
name=
"shopTel"
type=
"String"
/>
<variable
name=
"supplierName"
type=
"String"
/>
<variable
name=
"supplierAddress"
type=
"String"
/>
<variable
name=
"supplierTel"
type=
"String"
/>
<variable
name=
"date"
type=
"String"
/>
<variable
name=
"no"
type=
"String"
/>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:splitMotionEvents=
"false"
>
<!--<android.support.v7.widget.CardView-->
<!--android:id="@+id/f_left"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="0dp"-->
<!--android:layout_marginEnd="@dimen/all_padding"-->
<!--android:background="@color/white"-->
<!--app:cardElevation="@dimen/all_padding"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintHorizontal_weight="10"-->
<!--app:layout_constraintLeft_toLeftOf="parent"-->
<!--app:layout_constraintRight_toLeftOf="@+id/f_right"-->
<!--app:layout_constraintTop_toTopOf="parent"-->
<!--app:layout_constraintVertical_weight="25">-->
<!--<android.support.constraint.ConstraintLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:background="@color/white">-->
<!--<TextView-->
<!--android:id="@+id/tv_supplier_title"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:text="供货方"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/all_text_size_big"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<View-->
<!--android:id="@+id/view_line_left_1"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/all_slight_line_width"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:background="@color/line"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintTop_toBottomOf="@id/tv_supplier_title" />-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_supplier_name"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toTopOf="@id/view_line_left_1">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_stores" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{supplierName}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_supplier_address"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_supplier_name"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_supplier_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_supplier_name">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_address" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{supplierAddress}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_supplier_phone"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_supplier_name"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_supplier_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_supplier_address">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_telephone" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{supplierTel}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<TextView-->
<!--android:id="@+id/tv_shop_title"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginEnd="@dimen/all_margin"-->
<!--android:layout_marginStart="@dimen/all_margin"-->
<!--android:layout_marginTop="@dimen/all_margin_big"-->
<!--android:text="定货方"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/all_text_size_big"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_supplier_phone"-->
<!--app:layout_goneMarginTop="@dimen/all_margin" />-->
<!--<View-->
<!--android:id="@+id/view_line_left_2"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/all_slight_line_width"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:background="@color/line"-->
<!--app:layout_constraintTop_toBottomOf="@id/tv_shop_title" />-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_shop_name"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toTopOf="@id/view_line_left_2">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_stores" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{shopName}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_shop_address"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_shop_name"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_shop_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_shop_name">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_address" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{shopAddress}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_shop_phone"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_shop_name"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_shop_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_shop_address">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_telephone" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{shopTel}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<View-->
<!--android:id="@+id/view_line_left_3"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/all_slight_line_width"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:background="@color/line"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_shop_phone" />-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_date"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="@dimen/all_margin"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_shop_name"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_shop_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/view_line_left_3">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_dates_green" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{date}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_no"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal"-->
<!--android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_shop_name"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_shop_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/ll_date">-->
<!--<ImageView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="@mipmap/icon_no_green" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{no}"-->
<!--android:textColor="@color/black" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_result"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="@dimen/all_margin"-->
<!--android:gravity="center"-->
<!--android:orientation="horizontal"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintHorizontal_weight="1"-->
<!--app:layout_constraintStart_toEndOf="@id/ll_num">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center"-->
<!--android:paddingBottom="@dimen/dp_4"-->
<!--android:paddingLeft="@dimen/all_padding"-->
<!--android:paddingRight="@dimen/all_padding"-->
<!--android:paddingTop="@dimen/dp_4"-->
<!--android:text="@{finallyPrice}"-->
<!--android:textColor="@color/reddeep"-->
<!--android:textSize="@dimen/all_text_size_big" />-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:id="@+id/ll_num"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="center"-->
<!--android:orientation="horizontal"-->
<!--app:layout_constraintBottom_toBottomOf="@id/ll_result"-->
<!--app:layout_constraintEnd_toStartOf="@id/ll_result"-->
<!--app:layout_constraintHorizontal_weight="1"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toTopOf="@id/ll_result">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:padding="@dimen/dp_4"-->
<!--android:text="@{sumNum}"-->
<!--android:textColor="@color/reddeep"-->
<!--android:textSize="@dimen/all_text_size_big"-->
<!--android:textStyle="bold" />-->
<!--</LinearLayout>-->
<!--<TextView-->
<!--android:id="@+id/tv_result_hint"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:text="金额"-->
<!--android:textColor="@color/black"-->
<!--app:layout_constraintBottom_toTopOf="@id/ll_result"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_result"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_result" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:text="种类"-->
<!--android:textColor="@color/black"-->
<!--app:layout_constraintBottom_toBottomOf="@id/tv_result_hint"-->
<!--app:layout_constraintEnd_toEndOf="@id/ll_num"-->
<!--app:layout_constraintStart_toStartOf="@id/ll_num"-->
<!--app:layout_constraintTop_toTopOf="@id/tv_result_hint" />-->
<!--<View-->
<!--android:id="@+id/view_line_left_bottom"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/all_margin"-->
<!--android:layout_marginBottom="100dp"-->
<!--android:background="@color/lyt_main_bg"-->
<!--app:layout_constraintBottom_toBottomOf="parent" />-->
<!--</android.support.constraint.ConstraintLayout>-->
<!--</android.support.v7.widget.CardView>-->
<!--<android.support.constraint.ConstraintLayout-->
<!--android:id="@+id/f_right"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="0dp"-->
<!--android:background="@color/white"-->
<!--android:splitMotionEvents="false"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintHorizontal_weight="22"-->
<!--app:layout_constraintLeft_toRightOf="@+id/f_left"-->
<!--app:layout_constraintRight_toRightOf="parent"-->
<!--app:layout_constraintTop_toTopOf="parent"-->
<!--app:layout_constraintVertical_weight="25">-->
<!--<EditText-->
<!--android:id="@+id/et_keyword"-->
<!--style="@style/dialog_edit"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="0dp"-->
<!--android:layout_marginEnd="@dimen/all_margin"-->
<!--android:drawableEnd="@mipmap/ic_scan"-->
<!--android:hint="@string/inventory_add_et_hint"-->
<!--android:inputType="number"-->
<!--android:maxLength="19"-->
<!--android:minWidth="@dimen/fragment_store_et_min_width"-->
<!--android:paddingEnd="@dimen/fragment_detail_padding_end"-->
<!--android:paddingStart="@dimen/all_margin"-->
<!--android:singleLine="true"-->
<!--app:layout_constraintBottom_toBottomOf="@id/btn_search"-->
<!--app:layout_constraintRight_toRightOf="@id/btn_search"-->
<!--app:layout_constraintTop_toTopOf="@id/btn_search" />-->
<!--<ImageButton-->
<!--android:id="@+id/btn_search"-->
<!--android:layout_width="@dimen/fragment_store_btn_width"-->
<!--android:layout_height="@dimen/fragment_store_et_height"-->
<!--android:layout_marginEnd="@dimen/all_margin"-->
<!--android:layout_marginTop="@dimen/all_margin"-->
<!--android:background="@drawable/shape_store_btn_search_select"-->
<!--android:contentDescription="@string/store_search"-->
<!--android:scaleType="centerInside"-->
<!--android:src="@mipmap/store_search"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:text="@string/replenishment_detail_title"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/all_sub_title_size"-->
<!--app:layout_constraintBottom_toBottomOf="@id/et_keyword"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toTopOf="@id/et_keyword" />-->
<!--<View-->
<!--android:id="@+id/view_line"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/all_slight_line_width"-->
<!--android:layout_marginLeft="@dimen/all_padding"-->
<!--android:layout_marginRight="@dimen/all_margin"-->
<!--android:layout_marginTop="@dimen/all_padding"-->
<!--android:background="@color/line"-->
<!--app:layout_constraintTop_toBottomOf="@id/et_keyword" />-->
<!--<android.support.v7.widget.RecyclerView-->
<!--android:id="@+id/replenishment_right_recycler"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="0dp"-->
<!--android:layout_marginTop="@dimen/view_line_L1"-->
<!--android:splitMotionEvents="false"-->
<!--app:layout_constraintBottom_toTopOf="@id/cl_btn"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toBottomOf="@id/view_line" />-->
<!--<android.support.constraint.ConstraintLayout-->
<!--android:id="@+id/cl_btn"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="100dp"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintTop_toBottomOf="@id/replenishment_right_recycler">-->
<!--<View-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/all_slight_line_width"-->
<!--android:layout_marginLeft="@dimen/all_padding"-->
<!--android:layout_marginRight="@dimen/all_margin"-->
<!--android:layout_marginTop="@dimen/view_line_L1"-->
<!--android:background="@color/line"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<Button-->
<!--android:id="@+id/btn_end"-->
<!--style="@style/button_positive"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="@dimen/all_margin"-->
<!--android:layout_marginLeft="@dimen/all_margin"-->
<!--android:layout_marginRight="@dimen/all_margin"-->
<!--android:stateListAnimator="@null"-->
<!--android:text="@string/replenishment_detail_submit"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintEnd_toEndOf="parent" />-->
<!--<Button-->
<!--android:id="@+id/btn_print"-->
<!--style="@style/button_positive"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="@dimen/all_margin"-->
<!--android:layout_marginLeft="@dimen/all_margin"-->
<!--android:layout_marginRight="@dimen/all_margin"-->
<!--android:stateListAnimator="@null"-->
<!--android:text="@string/replenishment_detail_print"-->
<!--android:visibility="gone"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintStart_toStartOf="parent" />-->
<!--<Button-->
<!--android:id="@+id/btn_canel"-->
<!--style="@style/button_passive"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="@dimen/all_margin"-->
<!--android:layout_marginEnd="@dimen/all_margin_big"-->
<!--android:stateListAnimator="@null"-->
<!--android:text="@string/replenishment_detail_cancel"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintEnd_toStartOf="@id/btn_end"-->
<!--app:layout_goneMarginLeft="@dimen/all_margin"-->
<!--app:layout_goneMarginRight="@dimen/all_margin" />-->
<!--</android.support.constraint.ConstraintLayout>-->
<!--</android.support.constraint.ConstraintLayout>-->
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_replenishment_list.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_product"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/ll_title"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recycler"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:visibility=
"visible"
>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id=
"@+id/ll_empty"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/ll_title"
android:background=
"@color/white_caocao"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/tv_empty"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:drawablePadding=
"@dimen/all_margin"
android:drawableTop=
"@mipmap/nong"
android:gravity=
"center"
android:lineSpacingExtra=
"@dimen/all_padding"
android:text=
"@string/replenishment_empty_hint"
android:textColor=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_service.xml
View file @
e2b78a68
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
android:padding=
"0dp"
android:padding=
"0dp"
android:text=
"@string/menu_service"
android:text=
"@string/menu_service"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/
big_text
_size"
android:textSize=
"@dimen/
all_sub_title
_size"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintTop_toTopOf=
"parent"
>
</TextView>
</TextView>
...
...
app/src/main/res/layout/fragment_store.xml
View file @
e2b78a68
...
@@ -82,30 +82,38 @@
...
@@ -82,30 +82,38 @@
android:layout_marginTop=
"@dimen/all_margin"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
/>
android:background=
"@color/gray_huanggai"
/>
<LinearLayout
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_store"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
android:orientation=
"horizontal"
>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_skugrp"
android:id=
"@+id/rl_skugrp"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/srl_sku"
app:layout_constraintTop_toTopOf=
"parent"
/>
<android.support.v4.widget.SwipeRefreshLayout
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_sku"
android:id=
"@+id/srl_sku"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"3"
android:background=
"@color/white_caocao"
android:background=
"@color/white_caocao"
>
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_weight=
"3"
app:layout_constraintLeft_toRightOf=
"@id/rl_skugrp"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_sku"
android:id=
"@+id/rl_sku"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</
Linear
Layout>
</
android.support.constraint.Constraint
Layout>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_marketing_menu.xml
View file @
e2b78a68
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_
margin
"
android:layout_marginTop=
"@dimen/all_
padding_left_right
"
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
...
app/src/main/res/layout/item_menu_detail.xml
View file @
e2b78a68
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
android:id=
"@+id/text"
android:id=
"@+id/text"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black_baozheng"
/>
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
...
...
app/src/main/res/layout/item_replenishment.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name=
"shopName"
type=
"String"
/>
<variable
name=
"supplierName"
type=
"String"
/>
<variable
name=
"supplierAddress"
type=
"String"
/>
<variable
name=
"no"
type=
"String"
/>
<variable
name=
"date"
type=
"String"
/>
<variable
name=
"amt"
type=
"String"
/>
<variable
name=
"num"
type=
"String"
/>
<variable
name=
"status"
type=
"String"
/>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/all_padding"
android:background=
"@color/white"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
<LinearLayout
android:id=
"@+id/ll_boss"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:padding=
"@dimen/dp_4"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_stores"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/all_padding"
android:text=
"@{shopName}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/dp_4"
android:paddingEnd=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_padding"
android:paddingTop=
"@dimen/dp_4"
android:text=
"@{status}"
android:textColor=
"@color/white"
app:layout_constraintBottom_toBottomOf=
"@id/ll_boss"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/ll_boss"
/>
<LinearLayout
android:id=
"@+id/ll_date"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:padding=
"@dimen/dp_4"
app:layout_constraintTop_toBottomOf=
"@id/ll_boss"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_dates_green"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingBottom=
"@dimen/dp_4"
android:paddingStart=
"@dimen/all_padding"
android:paddingTop=
"@dimen/dp_4"
android:text=
"@{date}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_no"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:padding=
"@dimen/dp_4"
app:layout_constraintTop_toBottomOf=
"@id/ll_date"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_no_green"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingStart=
"@dimen/all_padding"
android:text=
"@{no}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_padding"
app:cardElevation=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_no"
>
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/gray_zhouyu"
android:padding=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_supplier_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"供货方"
android:textColor=
"@color/black"
android:textSize=
"@dimen/big_text_size"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/view_line_L1"
android:layout_marginTop=
"@dimen/dp_4"
android:background=
"@color/line_bg"
android:elevation=
"@dimen/view_line_L050"
app:layout_constraintEnd_toEndOf=
"@id/guideline_right"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_supplier_title"
/>
<LinearLayout
android:id=
"@+id/ll_supplier_info"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_padding"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"@id/guideline_right"
app:layout_constraintStart_toStartOf=
"@id/tv_supplier_title"
app:layout_constraintTop_toBottomOf=
"@id/tv_supplier_title"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_stores"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_4"
android:text=
"@{supplierName}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"@id/guideline_right"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_supplier_info"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_address"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_4"
android:text=
"@{supplierAddress}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<android.support.constraint.Guideline
android:id=
"@+id/guideline_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.66"
/>
<LinearLayout
android:id=
"@+id/ll_cut"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:layout_marginTop=
"@dimen/all_margin"
android:gravity=
"end"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/guideline_right"
app:layout_constraintTop_toTopOf=
"@id/tv_supplier_title"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{num}"
android:textColor=
"@color/reddeep"
android:textSize=
"@dimen/all_text_size_big"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_4"
android:text=
"件"
android:textColor=
"@color/black"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_price"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_padding"
android:layout_marginTop=
"@dimen/all_margin"
android:gravity=
"end"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"@id/ll_cut"
app:layout_constraintStart_toStartOf=
"@id/guideline_right"
app:layout_constraintTop_toBottomOf=
"@id/ll_cut"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_4"
android:text=
"¥"
android:textColor=
"@color/reddeep"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{amt}"
android:textColor=
"@color/reddeep"
android:textSize=
"@dimen/all_text_size_big"
/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_replenishment_detail.xml
0 → 100644
View file @
e2b78a68
<?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"
xmlns:tools=
"http://schemas.android.com/tools"
>
<data>
</data>
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_padding"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_padding"
android:layout_marginBottom=
"@dimen/all_padding"
app:cardCornerRadius=
"@dimen/all_shape_radius"
app:cardElevation=
"1dp"
>
<!--<android.support.constraint.ConstraintLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:padding="@dimen/all_padding"-->
<!--android:background="@drawable/black_border">-->
<!--<com.facebook.drawee.view.SimpleDraweeView-->
<!--android:id="@+id/img_goods"-->
<!--android:layout_width="130dp"-->
<!--android:layout_height="130dp"-->
<!--app:placeholderImage="@mipmap/icon_goods_default" />-->
<!--<TextView-->
<!--android:id="@+id/tv_goods_name"-->
<!--style="@style/other_select_blacktext_style"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginEnd="@dimen/all_margin"-->
<!--android:layout_marginTop="@dimen/all_margin"-->
<!--android:layout_marginStart="@dimen/all_padding"-->
<!--android:text="贝斯克莱因和美妖精生日巧克力蛋糕"-->
<!--app:layout_constraintEnd_toEndOf="@id/guideline_center"-->
<!--app:layout_constraintStart_toEndOf="@id/img_goods"-->
<!--app:layout_constraintTop_toTopOf="@id/img_goods" />-->
<!--<TextView-->
<!--android:id="@+id/tv_goods_code_hint"-->
<!--style="@style/other_select_smallstyle"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="@dimen/all_padding"-->
<!--android:text="条码:"-->
<!--app:layout_constraintStart_toStartOf="@id/tv_goods_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/tv_goods_name" />-->
<!--<TextView-->
<!--android:id="@+id/tv_goods_code"-->
<!--style="@style/other_select_smallstyle"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="0dp"-->
<!--android:text="12783163981789"-->
<!--app:layout_constraintBottom_toBottomOf="@id/tv_goods_code_hint"-->
<!--app:layout_constraintStart_toEndOf="@id/tv_goods_code_hint"-->
<!--app:layout_constraintTop_toTopOf="@id/tv_goods_code_hint" />-->
<!--<TextView-->
<!--android:id="@+id/tv_goods_size"-->
<!--style="@style/store_product_size"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="规格"-->
<!--app:layout_constraintBottom_toBottomOf="@id/tv_goods_price"-->
<!--app:layout_constraintStart_toStartOf="@id/tv_goods_name"-->
<!--app:layout_constraintTop_toBottomOf="@id/tv_goods_code_hint" />-->
<!--<TextView-->
<!--android:id="@+id/tv_goods_price"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="@dimen/all_margin"-->
<!--android:layout_marginEnd="@dimen/all_margin"-->
<!--android:text="999"-->
<!--android:textColor="@color/store_product_price"-->
<!--android:textSize="@dimen/fragment_store_product_price"-->
<!--app:layout_constraintBottom_toBottomOf="@id/img_goods"-->
<!--app:layout_constraintEnd_toEndOf="@id/guideline_center" />-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="2dp"-->
<!--android:text="@string/money_rmb"-->
<!--android:textColor="@color/store_product_price"-->
<!--android:textSize="@dimen/item_superpurchase_textsize_big"-->
<!--app:layout_constraintBottom_toBottomOf="@id/tv_goods_price"-->
<!--app:layout_constraintEnd_toStartOf="@+id/tv_goods_price" />-->
<!--<View-->
<!--android:layout_width="@dimen/all_line_width"-->
<!--android:layout_height="0dp"-->
<!--android:layout_marginBottom="@dimen/all_margin"-->
<!--android:layout_marginTop="@dimen/all_margin"-->
<!--android:background="@color/lyt_main_bg"-->
<!--app:layout_constraintBottom_toBottomOf="@id/img_goods"-->
<!--app:layout_constraintEnd_toEndOf="@id/guideline_center"-->
<!--app:layout_constraintTop_toTopOf="@id/img_goods" />-->
<!--<LinearLayout-->
<!--android:id="@+id/linearLayout"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="@dimen/dialog_cart_item_button_height"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:gravity="center"-->
<!--android:orientation="horizontal"-->
<!--app:layout_constraintBottom_toBottomOf="parent"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toStartOf="@id/guideline_center">-->
<!--<ImageButton-->
<!--android:id="@+id/btn_down"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_marginEnd="@dimen/all_margin"-->
<!--android:layout_weight="1"-->
<!--android:background="@color/white"-->
<!--android:src="@mipmap/but_cut"-->
<!--tools:layout_editor_absoluteX="602dp"-->
<!--tools:layout_editor_absoluteY="97dp" />-->
<!--<EditText-->
<!--android:id="@+id/et_count"-->
<!--android:layout_width="100dp"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_weight="1"-->
<!--android:background="@drawable/hint_border"-->
<!--android:gravity="center"-->
<!--android:hint="1"-->
<!--android:inputType="number"-->
<!--android:maxLength="4"-->
<!--android:saveEnabled="false"-->
<!--tools:layout_editor_absoluteX="540dp"-->
<!--tools:layout_editor_absoluteY="192dp" />-->
<!--<ImageButton-->
<!--android:id="@+id/btn_up"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_marginStart="@dimen/all_margin"-->
<!--android:layout_weight="1"-->
<!--android:background="@color/white"-->
<!--android:src="@mipmap/but_plus"-->
<!--tools:layout_editor_absoluteX="666dp"-->
<!--tools:layout_editor_absoluteY="97dp" />-->
<!--</LinearLayout>-->
<!--<TextView-->
<!--android:id="@+id/tv_stock_hint"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="right"-->
<!--android:text="库存:"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/big_text_size"-->
<!--app:layout_constraintBottom_toTopOf="@id/linearLayout"-->
<!--app:layout_constraintEnd_toStartOf="@id/tv_stock"-->
<!--app:layout_constraintHorizontal_weight="1"-->
<!--app:layout_constraintStart_toStartOf="@id/guideline_center"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<TextView-->
<!--android:id="@+id/tv_stock"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="0个"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/big_text_size"-->
<!--app:layout_constraintBottom_toTopOf="@id/linearLayout"-->
<!--app:layout_constraintEnd_toStartOf="@id/tv_traffic_hint"-->
<!--app:layout_constraintHorizontal_weight="1"-->
<!--app:layout_constraintStart_toEndOf="@id/tv_stock_hint"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<TextView-->
<!--android:id="@+id/tv_traffic_hint"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:gravity="right"-->
<!--android:text="在途:"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/big_text_size"-->
<!--app:layout_constraintBottom_toTopOf="@id/linearLayout"-->
<!--app:layout_constraintEnd_toStartOf="@id/tv_traffic"-->
<!--app:layout_constraintHorizontal_weight="1"-->
<!--app:layout_constraintStart_toEndOf="@id/tv_stock"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<TextView-->
<!--android:id="@+id/tv_traffic"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="0个"-->
<!--android:textColor="@color/black"-->
<!--android:textSize="@dimen/big_text_size"-->
<!--app:layout_constraintBottom_toTopOf="@id/linearLayout"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintHorizontal_weight="1"-->
<!--app:layout_constraintStart_toEndOf="@id/tv_traffic_hint"-->
<!--app:layout_constraintTop_toTopOf="parent" />-->
<!--<android.support.constraint.Guideline-->
<!--android:id="@+id/guideline_center"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--app:layout_constraintGuide_percent="0.60" />-->
<!--</android.support.constraint.ConstraintLayout>-->
</android.support.v7.widget.CardView>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_return_ticket.xml
View file @
e2b78a68
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
android:layout_weight=
"2.3"
>
android:layout_weight=
"2.3"
>
<ImageView
<ImageView
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@mipmap/return_ticket_one"
/>
android:background=
"@mipmap/return_ticket_one"
/>
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
android:layout_weight=
"1"
>
android:layout_weight=
"1"
>
<ImageView
<ImageView
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@mipmap/return_ticket_two"
android:background=
"@mipmap/return_ticket_two"
/>
/>
...
...
app/src/main/res/layout/item_s
tore_skugrp
.xml
→
app/src/main/res/layout/item_s
elector
.xml
View file @
e2b78a68
File moved
app/src/main/res/layout/item_statistics.xml
View file @
e2b78a68
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginEnd=
"@dimen/all_margin"
android:textStyle=
"bold"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size_small"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/img_left"
/>
app:layout_constraintTop_toTopOf=
"@id/img_left"
/>
...
@@ -36,7 +39,7 @@
...
@@ -36,7 +39,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_padding_left_right"
android:layout_marginEnd=
"@dimen/all_padding_left_right"
android:text=
"本店"
android:text=
"本店"
android:textSize=
"@dimen/
small_text_size
"
android:textSize=
"@dimen/
all_text_size_small
"
app:layout_constraintBottom_toBottomOf=
"@id/img_left"
app:layout_constraintBottom_toBottomOf=
"@id/img_left"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintEnd_toEndOf=
"parent"
/>
...
@@ -57,7 +60,7 @@
...
@@ -57,7 +60,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_padding"
android:layout_marginStart=
"@dimen/all_padding"
android:text=
"11-15 15:23"
android:text=
"11-15 15:23"
android:textSize=
"@dimen/
small_text_size
"
android:textSize=
"@dimen/
all_text_size_small_small
"
app:layout_constraintBottom_toBottomOf=
"@id/img_left"
app:layout_constraintBottom_toBottomOf=
"@id/img_left"
app:layout_constraintStart_toEndOf=
"@id/img_left"
/>
app:layout_constraintStart_toEndOf=
"@id/img_left"
/>
...
...
app/src/main/res/layout/item_store_sku.xml
View file @
e2b78a68
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
<variable
<variable
name=
"count"
name=
"count"
type=
"int"
/>
type=
"int"
/>
</data>
</data>
<android.support.constraint.ConstraintLayout
<android.support.constraint.ConstraintLayout
...
...
app/src/main/res/layout/item_string.xml
View file @
e2b78a68
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
android:singleLine=
"true"
android:singleLine=
"true"
android:text=
"北京店"
android:text=
"北京店"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"
14sp
"
/>
android:textSize=
"
@dimen/all_text_size_low
"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/item_string_head.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/item_tv"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:gravity=
"left"
android:paddingTop=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_padding_left_right"
android:singleLine=
"true"
android:text=
"北京店"
android:textColor=
"@color/black"
android:textSize=
"14sp"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/title.xml
View file @
e2b78a68
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/
big_text
_size"
/>
android:textSize=
"@dimen/
all_sub_title
_size"
/>
...
...
app/src/main/res/layout/title_appback.xml
View file @
e2b78a68
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
android:layout_centerInParent=
"true"
android:layout_centerInParent=
"true"
android:text=
"标题"
android:text=
"标题"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/
big_text
_size"
android:textSize=
"@dimen/
all_sub_title
_size"
/>
/>
...
...
app/src/main/res/layout/title_order.xml
View file @
e2b78a68
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:background=
"@color/white_caocao"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
>
>
...
@@ -52,7 +54,7 @@
...
@@ -52,7 +54,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_centerInParent=
"true"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/
big_text
_size"
android:textSize=
"@dimen/
all_sub_title
_size"
android:visibility=
"gone"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@id/iv_right"
app:layout_constraintEnd_toStartOf=
"@id/iv_right"
...
...
app/src/main/res/layout/view_group_all.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/transparent"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/editor_item_height"
android:gravity=
"center"
android:text=
"@{@string/ms_editor_buy + @string/ms_editor_group_all_hint}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/big_text_size"
/>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/view_group_cate.xml
0 → 100644
View file @
e2b78a68
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/transparent"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/editor_item_height"
android:gravity=
"center"
android:text=
"@string/ms_editor_buy"
android:textColor=
"@color/black"
android:textSize=
"@dimen/big_text_size"
/>
<org.angmarch.views.NiceSpinner
android:id=
"@+id/ns_type_1"
style=
"@style/editor_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:minWidth=
"@dimen/et_min_width_short"
app:backgroundSelector=
"@drawable/selector_white_background_stroke_2"
/>
<org.angmarch.views.NiceSpinner
android:id=
"@+id/ns_type_2"
style=
"@style/editor_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:minWidth=
"@dimen/et_min_width_short"
app:backgroundSelector=
"@drawable/selector_white_background_stroke_2"
/>
<org.angmarch.views.NiceSpinner
android:id=
"@+id/ns_type_3"
style=
"@style/editor_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:minWidth=
"@dimen/et_min_width_short"
android:visibility=
"gone"
app:backgroundSelector=
"@drawable/selector_white_background_stroke_2"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:gravity=
"center"
android:text=
"@string/ms_editor_group_skugrp_hint"
android:textColor=
"@color/black"
android:textSize=
"@dimen/big_text_size"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/view_group_sku.xml
0 → 100644
View file @
e2b78a68
<?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"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:layout_marginTop=
"@dimen/all_margin"
>
<EditText
android:id=
"@+id/et_search"
style=
"@style/searchBarEditor"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginEnd=
"@dimen/all_spacing"
android:layout_weight=
"1"
android:hint=
"@string/ms_editor_type_gift_search_hint"
android:inputType=
"text"
android:labelFor=
"@+id/et_search"
android:textColor=
"@color/black_likui"
android:textColorHint=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size"
/>
<ImageButton
android:id=
"@+id/btn_scan"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/transparent"
android:contentDescription=
"@string/store_scan"
android:foreground=
"?android:attr/actionBarItemBackground"
android:src=
"@mipmap/but_sweep_yard"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/gray_kongming"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<com.facebook.drawee.view.SimpleDraweeView
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"@dimen/all_margin"
/>
<LinearLayout
android:id=
"@+id/ll_product"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_spacing"
android:orientation=
"vertical"
android:padding=
"@dimen/all_margin"
>
<TextView
android:id=
"@+id/tv_product_name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/ms_editor_group_sku_name"
/>
<TextView
android:id=
"@+id/tv_product_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_margin"
android:text=
"@string/ms_editor_group_sku_price"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/view_time_detail.xml
0 → 100644
View file @
e2b78a68
<?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=
"timeStart"
type=
"String"
/>
<variable
name=
"timeEnd"
type=
"String"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_kongming"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"@string/ms_editor_time"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:id=
"@+id/tv_time_start"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginStart=
"@dimen/all_margin"
android:layout_weight=
"1"
android:foreground=
"?android:attr/selectableItemBackground"
android:gravity=
"center"
android:text=
"@{timeStart}"
android:textColor=
"@color/black_likui"
android:textSize=
"@dimen/all_text_size"
/>
<View
android:layout_width=
"@dimen/view_line_L1"
android:layout_height=
"match_parent"
android:layout_margin=
"@dimen/all_margin"
android:background=
"@color/golden_yuji"
/>
<TextView
android:id=
"@+id/tv_time_end"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:foreground=
"?android:attr/selectableItemBackground"
android:gravity=
"center"
android:text=
"@{timeEnd}"
android:textColor=
"@color/black_likui"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_kongming"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:gravity=
"center_vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
android:text=
"@string/ms_editor_week"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white_caocao"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<CheckBox
android:id=
"@+id/cb_mon"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_mon"
app:layout_constraintHorizontal_chainStyle=
"spread_inside"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/cb_tue"
app:layout_constraintTop_toTopOf=
"parent"
/>
<CheckBox
android:id=
"@+id/cb_tue"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_tue"
app:layout_constraintLeft_toRightOf=
"@id/cb_mon"
app:layout_constraintRight_toLeftOf=
"@id/cb_wed"
app:layout_constraintTop_toTopOf=
"@id/cb_mon"
/>
<CheckBox
android:id=
"@+id/cb_wed"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_wed"
app:layout_constraintLeft_toRightOf=
"@id/cb_tue"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/cb_mon"
/>
<CheckBox
android:id=
"@+id/cb_thu"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_thu"
app:layout_constraintLeft_toLeftOf=
"@id/cb_mon"
app:layout_constraintTop_toBottomOf=
"@id/cb_mon"
/>
<CheckBox
android:id=
"@+id/cb_fri"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_fri"
app:layout_constraintLeft_toLeftOf=
"@id/cb_tue"
app:layout_constraintTop_toTopOf=
"@id/cb_thu"
/>
<CheckBox
android:id=
"@+id/cb_sat"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_sat"
app:layout_constraintLeft_toLeftOf=
"@id/cb_wed"
app:layout_constraintTop_toTopOf=
"@id/cb_thu"
/>
<CheckBox
android:id=
"@+id/cb_sun"
android:layout_width=
"wrap_content"
android:layout_height=
"?attr/actionBarSize"
android:text=
"@string/week_sun"
app:layout_constraintTop_toBottomOf=
"@id/cb_thu"
/>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/icon_address.png
0 → 100644
View file @
e2b78a68
2.16 KB
app/src/main/res/mipmap-xhdpi/icon_dates_green.png
0 → 100644
View file @
e2b78a68
1.96 KB
app/src/main/res/mipmap-xhdpi/icon_no_green.png
0 → 100644
View file @
e2b78a68
1.98 KB
app/src/main/res/mipmap-xhdpi/icon_stores.png
0 → 100644
View file @
e2b78a68
1.93 KB
app/src/main/res/values/dimens.xml
View file @
e2b78a68
...
@@ -8,9 +8,15 @@
...
@@ -8,9 +8,15 @@
<dimen
name=
"all_margin_big"
>
28dp
</dimen>
<dimen
name=
"all_margin_big"
>
28dp
</dimen>
<dimen
name=
"all_spacing"
>
6dp
</dimen>
<dimen
name=
"all_spacing"
>
6dp
</dimen>
<dimen
name=
"all_sub_title_size"
>
20sp
</dimen>
<dimen
name=
"all_sub_title_size"
>
20sp
</dimen>
<dimen
name=
"big_text_size"
>
18sp
</dimen>
<dimen
name=
"sbig_text_size"
>
25sp
</dimen>
<dimen
name=
"all_text_size"
>
16sp
</dimen>
<dimen
name=
"all_text_size"
>
16sp
</dimen>
<dimen
name=
"all_text_size_low"
>
14sp
</dimen>
<dimen
name=
"all_text_size_small"
>
12sp
</dimen>
<dimen
name=
"all_text_size_small"
>
12sp
</dimen>
<dimen
name=
"all_text_size_small_small"
>
10sp
</dimen>
<dimen
name=
"small_text_size"
>
13sp
</dimen>
<dimen
name=
"all_caption_size"
>
12sp
</dimen>
<dimen
name=
"all_caption_size"
>
12sp
</dimen>
<dimen
name=
"all_body_size"
>
14sp
</dimen>
<dimen
name=
"all_tiny_size"
>
9sp
</dimen>
<dimen
name=
"all_tiny_size"
>
9sp
</dimen>
<dimen
name=
"all_title_size"
>
26sp
</dimen>
<dimen
name=
"all_title_size"
>
26sp
</dimen>
<dimen
name=
"all_padding"
>
10dp
</dimen>
<dimen
name=
"all_padding"
>
10dp
</dimen>
...
@@ -20,10 +26,7 @@
...
@@ -20,10 +26,7 @@
<dimen
name=
"all_text_size_super_big"
>
25sp
</dimen>
<dimen
name=
"all_text_size_super_big"
>
25sp
</dimen>
<dimen
name=
"all_margin_left"
>
17dp
</dimen>
<dimen
name=
"all_margin_left"
>
17dp
</dimen>
<dimen
name=
"title_height"
>
50dp
</dimen>
<dimen
name=
"title_height"
>
50dp
</dimen>
<dimen
name=
"small_text_size"
>
13sp
</dimen>
<dimen
name=
"all_textview_width"
>
120dp
</dimen>
<dimen
name=
"all_textview_width"
>
120dp
</dimen>
<dimen
name=
"big_text_size"
>
18sp
</dimen>
<dimen
name=
"sbig_text_size"
>
25sp
</dimen>
<dimen
name=
"all_dialog_button"
>
40dp
</dimen>
<dimen
name=
"all_dialog_button"
>
40dp
</dimen>
<integer
name=
"all_top_weight"
>
2
</integer>
<integer
name=
"all_top_weight"
>
2
</integer>
<integer
name=
"all_content_weight"
>
25
</integer>
<integer
name=
"all_content_weight"
>
25
</integer>
...
@@ -202,4 +205,8 @@
...
@@ -202,4 +205,8 @@
<dimen
name=
"store_cart_count"
>
20dp
</dimen>
<dimen
name=
"store_cart_count"
>
20dp
</dimen>
<!--新标准-->
<dimen
name=
"headline"
>
20dp
</dimen>
</resources>
</resources>
app/src/main/res/values/strings.xml
View file @
e2b78a68
...
@@ -272,7 +272,7 @@
...
@@ -272,7 +272,7 @@
<string
name=
"replenishment_add"
>
一键补货
</string>
<string
name=
"replenishment_add"
>
一键补货
</string>
<string
name=
"replenishment_order"
>
共%s个订单
</string>
<string
name=
"replenishment_order"
>
共%s个订单
</string>
<string
name=
"replenishment_search_hint"
>
搜索供货商订单
</string>
<string
name=
"replenishment_search_hint"
>
搜索供货商订单
</string>
<string
name=
"replenishment_empty_hint"
>
没有相关订单
</string>
<string
name=
"replenishment_empty_hint"
>
还没有订货单哦~
</string>
<string
name=
"replenishment_detail_cancel"
>
关闭
</string>
<string
name=
"replenishment_detail_cancel"
>
关闭
</string>
<string
name=
"replenishment_detail_submit"
>
定货提交
</string>
<string
name=
"replenishment_detail_submit"
>
定货提交
</string>
<string
name=
"replenishment_detail_print"
>
打印
</string>
<string
name=
"replenishment_detail_print"
>
打印
</string>
...
@@ -325,14 +325,21 @@
...
@@ -325,14 +325,21 @@
<string
name=
"ms_empty_hint"
>
没有搜到此计划\n请重新搜索,或点击添加按钮进行添加~
</string>
<string
name=
"ms_empty_hint"
>
没有搜到此计划\n请重新搜索,或点击添加按钮进行添加~
</string>
<string
name=
"ms_editor_title"
>
管理-营销计划
</string>
<string
name=
"ms_editor_title"
>
管理-营销计划
</string>
<string
name=
"ms_editor_setting"
>
设置营销计划
</string>
<string
name=
"ms_editor_setting"
>
设置营销计划
</string>
<string
name=
"ms_editor_name"
>
计划名称:
</string>
<string
name=
"ms_editor_subtitle_info"
>
基本信息
</string>
<string
name=
"ms_editor_name"
>
计划名称
</string>
<string
name=
"ms_editor_name_hint"
>
请输入计划名称
</string>
<string
name=
"ms_editor_name_hint"
>
请输入计划名称
</string>
<string
name=
"ms_editor_subtitle_time"
>
时间信息
</string>
<string
name=
"ms_editor_time_more"
>
更多设置
</string>
<string
name=
"ms_editor_date"
>
起止时间:
</string>
<string
name=
"ms_editor_date"
>
起止时间:
</string>
<string
name=
"ms_editor_time"
>
限定时段:
</string>
<string
name=
"ms_editor_date_start"
>
开始时间
</string>
<string
name=
"ms_editor_week"
>
限定星期:
</string>
<string
name=
"ms_editor_date_end"
>
结束时间
</string>
<string
name=
"ms_editor_time"
>
限定时段
</string>
<string
name=
"ms_editor_week"
>
限定星期
</string>
<string
name=
"ms_editor_subtitle_ms"
>
活动信息
</string>
<string
name=
"ms_editor_type"
>
营销方式:
</string>
<string
name=
"ms_editor_type"
>
营销方式:
</string>
<string
name=
"ms_editor_group"
>
营销对象:
</string>
<string
name=
"ms_editor_group"
>
营销主体
</string>
<string
name=
"ms_editor_area"
>
营销范围:
</string>
<string
name=
"ms_editor_user"
>
营销对象
</string>
<string
name=
"ms_editor_area"
>
营销范围
</string>
<string
name=
"ms_editor_buy"
>
买
</string>
<string
name=
"ms_editor_buy"
>
买
</string>
<string
name=
"ms_editor_group_all_hint"
>
任意商品
</string>
<string
name=
"ms_editor_group_all_hint"
>
任意商品
</string>
<string
name=
"ms_editor_group_skugrp_hint"
>
品类下的任意商品
</string>
<string
name=
"ms_editor_group_skugrp_hint"
>
品类下的任意商品
</string>
...
@@ -358,6 +365,10 @@
...
@@ -358,6 +365,10 @@
<string
name=
"ms_editor_type_gift_hint"
>
条码:请扫码或输入条码
</string>
<string
name=
"ms_editor_type_gift_hint"
>
条码:请扫码或输入条码
</string>
<string
name=
"ms_editor_type_gift_name"
>
品名:
</string>
<string
name=
"ms_editor_type_gift_name"
>
品名:
</string>
<string
name=
"ms_editor_type_gift_price"
>
售价:
</string>
<string
name=
"ms_editor_type_gift_price"
>
售价:
</string>
<string
name=
"ms_editor_type_gift_search_hint"
>
请扫内包装商品条码
</string>
<string
name=
"ms_editor_date_format"
>
%s年%s月%s日
</string>
<string
name=
"ms_editor_time_format"
>
%s:%s
</string>
<!--商品管理-->
<!--商品管理-->
<string
name=
"sssku_title"
>
商品维护
</string>
<string
name=
"sssku_title"
>
商品维护
</string>
...
@@ -627,6 +638,8 @@
...
@@ -627,6 +638,8 @@
<string
name=
"statistics_hint"
>
统计
</string>
<string
name=
"statistics_hint"
>
统计
</string>
<string
name=
"statistics_menu_order"
>
订单
</string>
<string
name=
"statistics_menu_order"
>
订单
</string>
<string
name=
"statistics_menu_ms"
>
营销
</string>
<string
name=
"statistics_menu_ms"
>
营销
</string>
<string
name=
"statistics_menu_ms_recharge"
>
充值记录
</string>
<string
name=
"statistics_menu_ms_usedTicket"
>
已用优惠券
</string>
<string
name=
"statistics_todayAmt_hint"
>
今日销售额
</string>
<string
name=
"statistics_todayAmt_hint"
>
今日销售额
</string>
<string
name=
"statistics_todayOrder_hint"
>
今日订单数
</string>
<string
name=
"statistics_todayOrder_hint"
>
今日订单数
</string>
<string
name=
"statistics_todayRecharge_hint"
>
今日充值
</string>
<string
name=
"statistics_todayRecharge_hint"
>
今日充值
</string>
...
@@ -649,6 +662,11 @@
...
@@ -649,6 +662,11 @@
<string
name=
"oder_detail_cutAmt"
>
抹零金额:
</string>
<string
name=
"oder_detail_cutAmt"
>
抹零金额:
</string>
<string
name=
"ticket_detail_date"
>
使用时间:
</string>
<string
name=
"ticket_detail_date"
>
使用时间:
</string>
<string
name=
"ticket_detail_no"
>
销售单号:
</string>
<string
name=
"ticket_detail_no"
>
销售单号:
</string>
<!--管理POS-->
<string
name=
"manage_replenishment_add"
>
一键补货
</string>
<string
name=
"manage_replenishment_unConfirmed"
>
待确认
</string>
<string
name=
"manage_replenishment_unReceive"
>
待收货
</string>
<string
name=
"manage_replenishment_finished"
>
已入库
</string>
</resources>
</resources>
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