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
4aea749b
Commit
4aea749b
authored
Dec 27, 2017
by
zhang_z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码;
parent
213c5941
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
255 additions
and
17 deletions
+255
-17
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettleActivity.java
...in/java/com/xingdata/zzdpos/ui/settle/SettleActivity.java
+6
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettleContract.java
...in/java/com/xingdata/zzdpos/ui/settle/SettleContract.java
+8
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/adapter/SaledetailAdapter.java
.../xingdata/zzdpos/ui/settle/adapter/SaledetailAdapter.java
+21
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/fragment/SettleFragment.java
...om/xingdata/zzdpos/ui/settle/fragment/SettleFragment.java
+29
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
...ain/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
+4
-8
app/src/main/res/layout/fragment_settle.xml
app/src/main/res/layout/fragment_settle.xml
+102
-9
app/src/main/res/layout/item_settle_saledetail.xml
app/src/main/res/layout/item_settle_saledetail.xml
+83
-0
app/src/main/res/mipmap-xhdpi/but_unfurled.png
app/src/main/res/mipmap-xhdpi/but_unfurled.png
+0
-0
app/src/main/res/mipmap-xhdpi/but_up.png
app/src/main/res/mipmap-xhdpi/but_up.png
+0
-0
app/src/main/res/mipmap-xxhdpi/but_unfurled.png
app/src/main/res/mipmap-xxhdpi/but_unfurled.png
+0
-0
app/src/main/res/mipmap-xxhdpi/but_up.png
app/src/main/res/mipmap-xxhdpi/but_up.png
+0
-0
app/src/main/res/mipmap-xxxhdpi/but_unfurled.png
app/src/main/res/mipmap-xxxhdpi/but_unfurled.png
+0
-0
app/src/main/res/mipmap-xxxhdpi/but_up.png
app/src/main/res/mipmap-xxxhdpi/but_up.png
+0
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettleActivity.java
View file @
4aea749b
...
...
@@ -9,6 +9,7 @@ import com.xingdata.zzdpos.R;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.databinding.ActivitySettleBinding
;
import
com.xingdata.zzdpos.model.Pay
;
import
com.xingdata.zzdpos.model.Saledetail
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.Vip
;
...
...
@@ -111,6 +112,11 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
mCashPayFragment
.
loadSaleorder
(
saleorder
);
}
@Override
public
void
loadSaledetails
(
List
<
Saledetail
>
saledetails
)
{
}
@Override
public
void
showPayFragment
(
int
payChannel
)
{
switch
(
payChannel
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettleContract.java
View file @
4aea749b
...
...
@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.ui.settle;
import
com.xingdata.zzdpos.base.BasePresenter
;
import
com.xingdata.zzdpos.base.BaseView
;
import
com.xingdata.zzdpos.model.Pay
;
import
com.xingdata.zzdpos.model.Saledetail
;
import
com.xingdata.zzdpos.model.Saleorder
;
import
com.xingdata.zzdpos.model.Ticket
;
import
com.xingdata.zzdpos.model.Vip
;
...
...
@@ -77,6 +78,13 @@ interface SettleContract {
*/
void
loadSaleorder
(
Saleorder
saleorder
);
/**
* 加载订单
*
* @param saledetails 详情列表
*/
void
loadSaledetails
(
List
<
Saledetail
>
saledetails
);
/**
* 显示支付页面
*
...
...
app/src/main/java/com/xingdata/zzdpos/ui/settle/adapter/SaledetailAdapter.java
0 → 100644
View file @
4aea749b
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
.
adapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemSettleSaledetailBinding
;
import
com.xingdata.zzdpos.model.Saledetail
;
import
java.util.ArrayList
;
public
class
SaledetailAdapter
extends
BaseAdapter
<
Saledetail
,
ItemSettleSaledetailBinding
>
{
public
SaledetailAdapter
()
{
super
(
R
.
layout
.
item_store_saledetail
,
new
ArrayList
<>());
}
@Override
protected
void
convert
(
ItemSettleSaledetailBinding
mViewBinding
,
Saledetail
item
)
{
}
}
app/src/main/java/com/xingdata/zzdpos/ui/settle/fragment/SettleFragment.java
View file @
4aea749b
...
...
@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.ui.settle.fragment;
import
android.support.design.widget.BottomSheetBehavior
;
import
android.support.v7.widget.StaggeredGridLayoutManager
;
import
android.view.View
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
...
...
@@ -69,8 +70,36 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
* @param settleMode 收款模式
*/
public
void
setViewBySettleMode
(
int
settleMode
)
{
switch
(
settleMode
)
{
case
C
.
SETTLE_MODE
.
PAYMENT
:
mViewBinding
.
llTicket
.
setVisibility
(
View
.
GONE
);
break
;
case
C
.
SETTLE_MODE
.
STORE
:
mViewBinding
.
llTicket
.
setVisibility
(
View
.
VISIBLE
);
this
.
initStoreView
();
break
;
}
}
/**
* 初始化
*/
private
void
initStoreView
()
{
mViewBinding
.
llSaledetail
.
setOnClickListener
(
view
->
mViewBinding
.
cbSaledetail
.
setChecked
(!
mViewBinding
.
cbSaledetail
.
isChecked
()));
mViewBinding
.
llMs
.
setOnClickListener
(
view
->
mViewBinding
.
cbMs
.
setChecked
(!
mViewBinding
.
cbMs
.
isChecked
()));
mViewBinding
.
cbSaledetail
.
setOnCheckedChangeListener
((
compoundButton
,
b
)
->
{
mViewBinding
.
cbSaledetail
.
setButtonDrawable
(
b
?
R
.
mipmap
.
but_up
:
R
.
mipmap
.
but_unfurled
);
mViewBinding
.
rlSaledetail
.
setVisibility
(
b
?
View
.
VISIBLE
:
View
.
GONE
);
});
mViewBinding
.
cbMs
.
setOnCheckedChangeListener
((
compoundButton
,
b
)
->
{
mViewBinding
.
cbMs
.
setButtonDrawable
(
b
?
R
.
mipmap
.
but_up
:
R
.
mipmap
.
but_unfurled
);
mViewBinding
.
rlMs
.
setVisibility
(
b
?
View
.
VISIBLE
:
View
.
GONE
);
});
}
/**
* 加载会员
*
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
View file @
4aea749b
...
...
@@ -100,10 +100,8 @@ public class StorePresenter extends StoreContract.Presenter {
updateCart
(
sku
,
1
);
//发送购物车信息(不需要刷新页面)
mView
.
loadSaledetails
(
mSaledetails
,
false
);
//设置订单信息
mSaleorder
.
setSaledetails
(
mSaledetails
);
//统计订单信息
this
.
reprice
();
//购物车发生变化
this
.
cartChanged
();
}
@Override
...
...
@@ -112,10 +110,8 @@ public class StorePresenter extends StoreContract.Presenter {
updateCart
(
sku
,
-
1
);
//发送购物车信息(不需要刷新页面)
mView
.
loadSaledetails
(
mSaledetails
,
false
);
//设置订单信息
mSaleorder
.
setSaledetails
(
mSaledetails
);
//统计订单信息
this
.
reprice
();
//购物车发生变化
this
.
cartChanged
();
}
@Override
...
...
app/src/main/res/layout/fragment_settle.xml
View file @
4aea749b
...
...
@@ -172,19 +172,113 @@
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginBottom=
"@dimen/all_spacing"
android:background=
"@color/gray_huanggai"
/>
<FrameLayout
android:id=
"@+id/f_saledetail"
<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:id=
"@+id/ll_store"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
/>
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_saledetail"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:animateLayoutChanges=
"true"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"horizontal"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"?attr/actionBarSize"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:text=
"@string/settle_saledetail_hint"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<CheckBox
android:id=
"@+id/cb_saledetail"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:button=
"@mipmap/but_unfurled"
android:foreground=
"?android:attr/actionBarItemBackground"
/>
</LinearLayout>
<View
android:id=
"@+id/rl_saledetail"
android:layout_width=
"match_parent"
android:layout_height=
"300dp"
android:background=
"@color/red_xishi"
android:visibility=
"gone"
/>
<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_ms"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:animateLayoutChanges=
"true"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
android:orientation=
"horizontal"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"?attr/actionBarSize"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:text=
"@string/settle_ms_hint"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size"
/>
<CheckBox
android:id=
"@+id/cb_ms"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:button=
"@mipmap/but_unfurled"
android:foreground=
"?android:attr/actionBarItemBackground"
/>
</LinearLayout>
<View
android:id=
"@+id/rl_ms"
android:layout_width=
"match_parent"
android:layout_height=
"100dp"
android:background=
"@color/red_diaochan"
android:visibility=
"gone"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_vip"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/white_caocao"
android:orientation=
"vertical"
>
...
...
@@ -223,7 +317,7 @@
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_
huanggai
"
/>
android:background=
"@color/gray_
kongming
"
/>
<LinearLayout
android:id=
"@+id/ll_ticket"
...
...
@@ -271,7 +365,7 @@
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_
huanggai
"
/>
android:background=
"@color/gray_
kongming
"
/>
<LinearLayout
android:id=
"@+id/ll_point"
...
...
@@ -304,7 +398,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:button=
"@mipmap/but_elect02"
android:contentDescription=
"@string/settle_
balance
"
/>
android:contentDescription=
"@string/settle_
point
"
/>
</LinearLayout>
...
...
@@ -313,7 +407,7 @@
android:layout_height=
"@dimen/all_line_width"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@color/gray_
huanggai
"
/>
android:background=
"@color/gray_
kongming
"
/>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -348,7 +442,6 @@
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
...
...
app/src/main/res/layout/item_settle_saledetail.xml
0 → 100644
View file @
4aea749b
<?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"
>
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:orientation=
"vertical"
android:paddingEnd=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:maxLines=
"2"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_caption_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_weight=
"6"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/tv_count"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_count"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"end"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_caption_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@+id/tv_name"
app:layout_constraintRight_toLeftOf=
"@+id/tv_price"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_initial_price"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"end"
android:textColor=
"@color/gray"
android:textSize=
"@dimen/all_caption_size"
android:visibility=
"gone"
app:layout_constraintBottom_toTopOf=
"@+id/tv_price"
app:layout_constraintLeft_toRightOf=
"@+id/tv_count"
app:layout_constraintRight_toLeftOf=
"@+id/tv_amt"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"end"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_caption_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_weight=
"2"
app:layout_constraintLeft_toRightOf=
"@+id/tv_count"
app:layout_constraintRight_toLeftOf=
"@+id/tv_amt"
app:layout_constraintTop_toBottomOf=
"@id/tv_initial_price"
/>
<TextView
android:id=
"@+id/tv_amt"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"end"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_caption_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_weight=
"2"
app:layout_constraintLeft_toRightOf=
"@+id/tv_price"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
</layout>
app/src/main/res/mipmap-xhdpi/but_unfurled.png
0 → 100644
View file @
4aea749b
1.12 KB
app/src/main/res/mipmap-xhdpi/but_up.png
0 → 100644
View file @
4aea749b
1.11 KB
app/src/main/res/mipmap-xxhdpi/but_unfurled.png
0 → 100644
View file @
4aea749b
1.22 KB
app/src/main/res/mipmap-xxhdpi/but_up.png
0 → 100644
View file @
4aea749b
1.25 KB
app/src/main/res/mipmap-xxxhdpi/but_unfurled.png
0 → 100644
View file @
4aea749b
1.33 KB
app/src/main/res/mipmap-xxxhdpi/but_up.png
0 → 100644
View file @
4aea749b
1.31 KB
app/src/main/res/values/strings.xml
View file @
4aea749b
...
...
@@ -520,6 +520,8 @@
<string
name=
"settle_point_vip_text"
>
可用积分
</string>
<string
name=
"settle_point_amt_text"
>
, 可抵用
</string>
<string
name=
"settle_balance"
>
账户余额
</string>
<string
name=
"settle_saledetail_hint"
>
商品详情
</string>
<string
name=
"settle_ms_hint"
>
账户余额
</string>
<!--支付里的Vip-->
<string
name=
"settle_vip_search_hint"
>
请输入会员手机号
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment