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
48840b34
Commit
48840b34
authored
Jan 08, 2018
by
陈前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一键补货
parent
459929f6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
42 deletions
+105
-42
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentDetailFragment.java
...e/replenishment/fragment/ReplenishmentDetailFragment.java
+22
-4
app/src/main/res/layout/fragment_replenishement_detail.xml
app/src/main/res/layout/fragment_replenishement_detail.xml
+75
-18
app/src/main/res/layout/item_replenishment_detail.xml
app/src/main/res/layout/item_replenishment_detail.xml
+7
-20
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+1
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/manage/replenishment/fragment/ReplenishmentDetailFragment.java
View file @
48840b34
...
...
@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.LoginPresenter;
import
com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter
;
import
com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentDetailAdapter
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.util.ArrayList
;
...
...
@@ -50,8 +51,24 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
@Override
public
void
initView
()
{
Drawable
drawableTop
=
getResources
().
getDrawable
(
R
.
mipmap
.
but_up
);
Drawable
drawableBottom
=
getResources
().
getDrawable
(
R
.
mipmap
.
but_unfurled
);
drawableTop
.
setBounds
(
0
,
0
,
(
int
)
mViewBinding
.
tvShopTitle
.
getTextSize
()
-
10
,
(
int
)
mViewBinding
.
tvShopTitle
.
getTextSize
()
-
10
);
drawableBottom
.
setBounds
(
0
,
0
,
(
int
)
mViewBinding
.
tvShopTitle
.
getTextSize
()
-
10
,
(
int
)
mViewBinding
.
tvShopTitle
.
getTextSize
()
-
10
);
mViewBinding
.
tvShopTitle
.
setCompoundDrawables
(
null
,
null
,
drawableTop
,
null
);
initRecycycler
();
mViewBinding
.
tvShopTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
if
(
mViewBinding
.
llShop
.
getVisibility
()
!=
View
.
VISIBLE
)
{
mViewBinding
.
llShop
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvShopTitle
.
setCompoundDrawables
(
null
,
null
,
drawableBottom
,
null
);
}
else
{
mViewBinding
.
llShop
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvShopTitle
.
setCompoundDrawables
(
null
,
null
,
drawableTop
,
null
);
}
}
});
// mViewBinding.btnSearch.setOnClickListener(view -> {
// scrollToItem(mViewBinding.etKeyword.getText().toString().trim());
// });
...
...
@@ -89,7 +106,8 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
// }
// });
}
//
//
private
void
initRecycycler
()
{
mViewBinding
.
recyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
if
(
mPsb
!=
null
&&
mPsb
.
getPsbStatus
()
!=
null
)
{
...
...
@@ -214,16 +232,16 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
/**
* 获取空页面
*
*
* @return 空页面
*/
protected
View
getEmptyView
()
{
@SuppressLint
(
"InflateParams"
)
View
view
=
getLayoutInflater
().
inflate
(
R
.
layout
.
view_empty
,
null
);
TextView
textView
=
((
TextView
)
view
.
findViewById
(
R
.
id
.
tv_empty
));
TextView
textView
=
((
TextView
)
view
.
findViewById
(
R
.
id
.
tv_empty
));
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
)
{
...
...
app/src/main/res/layout/fragment_replenishement_detail.xml
View file @
48840b34
...
...
@@ -55,28 +55,31 @@
type=
"String"
/>
</data>
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
android:splitMotionEvents=
"false"
>
<include
android:id=
"@+id/ly_title"
layout=
"@layout/title_order"
/>
layout=
"@layout/title_order"
app:layout_constraintTop_toTopOf=
"parent"
/>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_default"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/ly_title"
android:layout_marginTop=
"@dimen/all_margin"
android:background=
"@color/white_caocao"
>
<TextView
android:id=
"@+id/tv_supplier_title"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_padding_left_right"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_padding_left_right"
android:paddingTop=
"@dimen/all_padding"
...
...
@@ -84,6 +87,8 @@
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
android:visibility=
"@{isShowSupplier? View.VISIBLE: View.GONE}"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -91,14 +96,14 @@
android:id=
"@+id/tv_supplier_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_
padding_left_right
"
android:layout_margin=
"@dimen/all_
margin
"
android:drawableStart=
"@mipmap/icon_stores"
android:text=
"@{supplierName}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size_low"
android:visibility=
"@{isShowSupplier? View.VISIBLE: View.GONE}"
app:layout_constraintBottom_toBottomOf=
"@id/tv_supplier_title"
app:layout_constraintEnd_toEndOf=
"
parent
"
app:layout_constraintEnd_toEndOf=
"
@id/tv_supplier_title
"
app:layout_constraintTop_toTopOf=
"@id/tv_supplier_title"
/>
<View
...
...
@@ -123,6 +128,7 @@
android:orientation=
"vertical"
android:paddingEnd=
"@dimen/all_padding_left_right"
android:paddingStart=
"@dimen/all_padding_left_right"
android:visibility=
"gone"
app:layout_constraintTop_toTopOf=
"@id/view_line_left_1"
>
<LinearLayout
...
...
@@ -204,8 +210,10 @@
<TextView
android:id=
"@+id/tv_shop_title"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_padding_left_right"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_padding_left_right"
android:paddingTop=
"@dimen/all_padding"
...
...
@@ -220,13 +228,13 @@
android:id=
"@+id/tv_shop_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_
padding_left_right
"
android:layout_marginEnd=
"@dimen/all_
margin
"
android:drawableStart=
"@mipmap/icon_stores"
android:text=
"@{shopName}"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size"
app:layout_constraintBottom_toBottomOf=
"@id/tv_shop_title"
app:layout_constraintEnd_toEndOf=
"
parent
"
app:layout_constraintEnd_toEndOf=
"
@id/tv_shop_title
"
app:layout_constraintTop_toTopOf=
"@id/tv_shop_title"
/>
<View
...
...
@@ -249,6 +257,7 @@
android:orientation=
"vertical"
android:paddingEnd=
"@dimen/all_padding_left_right"
android:paddingStart=
"@dimen/all_padding_left_right"
android:visibility=
"gone"
app:layout_constraintTop_toBottomOf=
"@id/tv_shop_title"
>
<LinearLayout
...
...
@@ -308,9 +317,9 @@
android:id=
"@+id/ll_shop_phone"
android:layout_width=
"match_parent"
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"
>
...
...
@@ -419,10 +428,10 @@
android:paddingBottom=
"@dimen/dp_4"
android:paddingLeft=
"@dimen/all_padding"
android:paddingRight=
"@dimen/all_padding"
android:paddingTop=
"@dimen/
dp_4
"
android:paddingTop=
"@dimen/
all_padding
"
android:text=
"@{finallyPrice}"
android:textColor=
"@color/reddeep"
android:textSize=
"@dimen/
all_text_size_big
"
/>
android:textSize=
"@dimen/
big_big_text_size
"
/>
</LinearLayout>
...
...
@@ -441,10 +450,10 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/
dp_4
"
android:padding=
"@dimen/
all_padding
"
android:text=
"@{sumNum}"
android:textColor=
"@color/reddeep"
android:textSize=
"@dimen/
all_text_size_big
"
android:textSize=
"@dimen/
big_big_text_size
"
android:textStyle=
"bold"
/>
...
...
@@ -461,9 +470,10 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"8dp"
android:paddingTop=
"@dimen/all_
margin
"
android:paddingTop=
"@dimen/all_
padding
"
android:text=
"金额"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size_low"
app:layout_constraintEnd_toEndOf=
"@+id/ll_result"
app:layout_constraintStart_toStartOf=
"@id/ll_result"
app:layout_constraintTop_toBottomOf=
"@id/ll_no"
/>
...
...
@@ -472,9 +482,10 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_
margin
"
android:paddingTop=
"@dimen/all_
padding
"
android:text=
"缺货种类"
android:textColor=
"@color/black"
android:textSize=
"@dimen/all_text_size_low"
app:layout_constraintBottom_toBottomOf=
"@id/tv_result_hint"
app:layout_constraintEnd_toEndOf=
"@id/ll_num"
app:layout_constraintStart_toStartOf=
"@id/ll_num"
...
...
@@ -492,11 +503,57 @@
app:layout_constraintTop_toBottomOf=
"@id/ll_result"
/>
</android.support.constraint.ConstraintLayout>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:layout_above=
"@id/ll_bottom"
android:layout_below=
"@id/cl_default"
>
</android.support.v7.widget.RecyclerView>
<LinearLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_alignParentStart=
"true"
android:background=
"@color/white_caocao"
android:elevation=
"@dimen/view_line_L2"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"parent"
>
<Button
android:id=
"@+id/btn_print"
style=
"@style/button_passive"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_padding"
android:layout_weight=
"1"
android:stateListAnimator=
"@null"
android:text=
"取消"
android:textSize=
"@dimen/all_text_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/btn_confirm"
app:layout_constraintTop_toTopOf=
"parent"
/>
<Button
android:id=
"@+id/btn_return"
style=
"@style/button_positive"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_padding"
android:layout_weight=
"1"
android:stateListAnimator=
"@null"
android:text=
"定货提交"
android:textSize=
"@dimen/all_text_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@id/btn_cancel"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_replenishment_detail.xml
View file @
48840b34
...
...
@@ -29,7 +29,6 @@
android:layout_marginEnd=
"@dimen/all_padding_left_right"
android:layout_marginStart=
"@dimen/all_padding_left_right"
android:text=
"贝斯克莱因和美妖精生日巧克力蛋糕"
app:layout_constraintStart_toEndOf=
"@id/img_goods"
app:layout_constraintTop_toTopOf=
"@id/img_goods"
/>
...
...
@@ -58,10 +57,10 @@
android:id=
"@+id/tv_goods_size"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"规格"
android:textSize=
"@dimen/all_text_size_small"
android:background=
"@drawable/frame_frame_zhouyu_bg"
android:padding=
"@dimen/dp_4"
android:text=
"规格"
android:textSize=
"@dimen/all_text_size_small"
app:layout_constraintBottom_toBottomOf=
"@id/tv_goods_code"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_goods_code"
/>
...
...
@@ -91,15 +90,6 @@
app:layout_constraintTop_toTopOf=
"@id/tv_price_hint"
/>
<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_constraintTop_toTopOf=
"@id/img_goods"
/>
<LinearLayout
android:id=
"@+id/linearLayout"
android:layout_width=
"wrap_content"
...
...
@@ -107,8 +97,7 @@
android:gravity=
"center"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"@id/tv_price_hint"
app:layout_constraintEnd_toEndOf=
"parent"
>
app:layout_constraintEnd_toEndOf=
"parent"
>
<ImageButton
android:id=
"@+id/btn_down"
...
...
@@ -117,14 +106,14 @@
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@color/white"
android:src=
"@mipmap/but_reduce"
tools:layout_editor_absoluteX=
"602dp"
tools:layout_editor_absoluteY=
"97dp"
/>
android:src=
"@mipmap/but_reduce"
/>
<EditText
android:id=
"@+id/et_count"
android:layout_width=
"50dp"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"@dimen/dp_4"
android:layout_marginTop=
"@dimen/dp_4"
android:layout_weight=
"1"
android:background=
"@drawable/selector_edit_frame_blue_background"
android:gravity=
"center"
...
...
@@ -132,8 +121,7 @@
android:inputType=
"number"
android:maxLength=
"4"
android:saveEnabled=
"false"
tools:layout_editor_absoluteX=
"540dp"
tools:layout_editor_absoluteY=
"192dp"
/>
android:textSize=
"@dimen/all_text_size_low"
/>
<ImageButton
android:id=
"@+id/btn_up"
...
...
@@ -204,7 +192,6 @@
app:layout_constraintTop_toBottomOf=
"@id/tv_stock_hint"
/>
</android.support.constraint.ConstraintLayout>
...
...
app/src/main/res/values/dimens.xml
View file @
48840b34
...
...
@@ -9,6 +9,7 @@
<dimen
name=
"all_spacing"
>
6dp
</dimen>
<dimen
name=
"all_sub_title_size"
>
20sp
</dimen>
<dimen
name=
"big_text_size"
>
18sp
</dimen>
<dimen
name=
"big_big_text_size"
>
20sp
</dimen>
<dimen
name=
"sbig_text_size"
>
25sp
</dimen>
<dimen
name=
"all_text_size"
>
16sp
</dimen>
<dimen
name=
"all_text_size_small_title"
>
17sp
</dimen>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment