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
47cc1a85
Commit
47cc1a85
authored
Jan 17, 2018
by
陈前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI
parent
a9db9497
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
46 deletions
+55
-46
app/src/main/java/com/xingdata/zzdpos/ui/manage/inventory/fragment/InventoryAddFragment.java
...os/ui/manage/inventory/fragment/InventoryAddFragment.java
+37
-32
app/src/main/java/com/xingdata/zzdpos/ui/manage/otherselect/fragment/OtherListFragment.java
...pos/ui/manage/otherselect/fragment/OtherListFragment.java
+1
-6
app/src/main/res/layout/dialog_base.xml
app/src/main/res/layout/dialog_base.xml
+6
-5
app/src/main/res/layout/item_inventory_goods.xml
app/src/main/res/layout/item_inventory_goods.xml
+10
-2
app/src/main/res/mipmap-xhdpi/bg_service.png
app/src/main/res/mipmap-xhdpi/bg_service.png
+0
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/manage/inventory/fragment/InventoryAddFragment.java
View file @
47cc1a85
...
@@ -38,9 +38,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -38,9 +38,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
private
List
<
Sssku
>
topCsList
=
new
ArrayList
<>();
private
List
<
Sssku
>
topCsList
=
new
ArrayList
<>();
private
InventoryGoodsAdapter
mInventoryGoodsAdapter
;
private
InventoryGoodsAdapter
mInventoryGoodsAdapter
;
private
CsCartDialog
mCartDialog
=
new
CsCartDialog
();
private
CsCartDialog
mCartDialog
=
new
CsCartDialog
();
private
Drawable
drawable
;
private
RecyclerViewUtil
.
ListCardItemDecoration
emptyItemDecoration
;
private
RecyclerViewUtil
.
ListCardItemDecoration
listItemDecoration
;
/**
/**
* 当前购物车信息
* 当前购物车信息
*/
*/
...
@@ -56,9 +54,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -56,9 +54,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
singleline_zhouyu_huanggai
);
emptyItemDecoration
=
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
50
,
drawable
,
1
);
listItemDecoration
=
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
50
,
drawable
,
0
);
initRecycler
();
initRecycler
();
mViewBinding
.
setCartCount
(
0
);
mViewBinding
.
setCartCount
(
0
);
mViewBinding
.
icTitle
.
edTitle
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
icTitle
.
edTitle
.
setVisibility
(
View
.
GONE
);
...
@@ -114,20 +110,21 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -114,20 +110,21 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
mInventoryGoodsAdapter
=
new
InventoryGoodsAdapter
(
topCsList
);
mInventoryGoodsAdapter
=
new
InventoryGoodsAdapter
(
topCsList
);
mInventoryGoodsAdapter
.
setEmptyView
(
getEmptyView
());
mInventoryGoodsAdapter
.
setEmptyView
(
getEmptyView
());
mInventoryGoodsAdapter
.
setOnItemLongClickListener
((
adapter
,
view
,
position
)
->
{
mInventoryGoodsAdapter
.
setOnItemLongClickListener
((
adapter
,
view
,
position
)
->
{
PromptDialog
delDialog
=
new
PromptDialog
();
if
(
bottomCsList
.
size
()
==
0
)
{
delDialog
.
setDialogType
(
PromptDialog
.
PROMPTDIALOG_SELECT
,
"是否删除"
).
setClick
(
new
View
.
OnClickListener
()
{
mPresenter
.
cancelInventoryAdd
(
mCs
);
@Override
}
else
{
public
void
onClick
(
View
view
)
{
PromptDialog
promptDialog
=
new
PromptDialog
();
adapter
.
getData
().
remove
(
position
);
promptDialog
.
setDialogType
(
PromptDialog
.
PROMPTDIALOG_SELECT
,
"退出前是否删除本次盘库记录"
).
setClick
(
view1
->
{
adapter
.
notifyDataSetChanged
();
mPresenter
.
cancelInventoryAdd
(
mCs
);
delDialog
.
dismiss
();
promptDialog
.
dismiss
();
}
},
new
View
.
OnClickListener
()
{
},
view1
->
{
@Override
promptDialog
.
dismiss
();
public
void
onClick
(
View
view
)
{
pop
();
delDialog
.
dismiss
();
}
}).
setCancelables
(
false
).
show
((
BaseActivity
)
mContext
);
}).
setCancelables
(
false
).
show
((
BaseActivity
)
mContext
);
}
return
false
;
return
false
;
});
});
mInventoryGoodsAdapter
.
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
{
mInventoryGoodsAdapter
.
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
{
...
@@ -146,10 +143,8 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -146,10 +143,8 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
}
}
});
});
Drawable
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
singleline_zhouyu_huanggai
);
mViewBinding
.
recyclerView
.
addItemDecoration
(
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
50
,
drawable
));
mViewBinding
.
recyclerView
.
setAdapter
(
mInventoryGoodsAdapter
);
mViewBinding
.
recyclerView
.
setAdapter
(
mInventoryGoodsAdapter
);
mViewBinding
.
recyclerView
.
addItemDecoration
(
emptyItemDecoration
);
}
}
...
@@ -166,9 +161,14 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -166,9 +161,14 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
}
}
}
}
}
}
mInventoryGoodsAdapter
.
notifyDataSetChanged
();
updateRecycler
();
}
}
private
void
updateRecycler
()
{
mInventoryGoodsAdapter
.
notifyDataSetChanged
();
}
public
void
addInventoryGoodsItem
(
Sssku
sssku
)
{
public
void
addInventoryGoodsItem
(
Sssku
sssku
)
{
if
(!
topCsList
.
contains
(
sssku
))
{
if
(!
topCsList
.
contains
(
sssku
))
{
...
@@ -183,7 +183,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -183,7 +183,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
}
}
mInventoryGoodsAdapter
.
notifyDataSetChanged
();
updateRecycler
();
}
}
public
void
addInventoryDetailItem
(
CsDetail
csDetail
,
Sssku
sssku
)
{
public
void
addInventoryDetailItem
(
CsDetail
csDetail
,
Sssku
sssku
)
{
...
@@ -219,6 +219,9 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -219,6 +219,9 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
@Override
@Override
public
boolean
onBackPressedSupport
()
{
public
boolean
onBackPressedSupport
()
{
if
(
bottomCsList
.
size
()
==
0
)
{
mPresenter
.
cancelInventoryAdd
(
mCs
);
}
else
{
PromptDialog
promptDialog
=
new
PromptDialog
();
PromptDialog
promptDialog
=
new
PromptDialog
();
promptDialog
.
setDialogType
(
PromptDialog
.
PROMPTDIALOG_SELECT
,
"退出前是否删除本次盘库记录"
).
setClick
(
view1
->
{
promptDialog
.
setDialogType
(
PromptDialog
.
PROMPTDIALOG_SELECT
,
"退出前是否删除本次盘库记录"
).
setClick
(
view1
->
{
mPresenter
.
cancelInventoryAdd
(
mCs
);
mPresenter
.
cancelInventoryAdd
(
mCs
);
...
@@ -229,6 +232,8 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
...
@@ -229,6 +232,8 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
pop
();
pop
();
}).
setCancelables
(
false
).
show
((
BaseActivity
)
mContext
);
}).
setCancelables
(
false
).
show
((
BaseActivity
)
mContext
);
}
return
true
;
return
true
;
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/manage/otherselect/fragment/OtherListFragment.java
View file @
47cc1a85
...
@@ -34,7 +34,6 @@ import java.util.List;
...
@@ -34,7 +34,6 @@ import java.util.List;
public
class
OtherListFragment
extends
BaseFragment
<
OtherSelectPresenter
,
FragmentOtherListBinding
>
{
public
class
OtherListFragment
extends
BaseFragment
<
OtherSelectPresenter
,
FragmentOtherListBinding
>
{
private
OtherSelectAdapter
mOtherSelectAdapter
;
private
OtherSelectAdapter
mOtherSelectAdapter
;
private
Drawable
drawable
;
private
Drawable
drawable
;
private
RecyclerViewUtil
.
ListCardItemDecoration
emptyItemDecoration
;
private
RecyclerViewUtil
.
ListCardItemDecoration
listItemDecoration
;
private
RecyclerViewUtil
.
ListCardItemDecoration
listItemDecoration
;
...
@@ -46,13 +45,12 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
...
@@ -46,13 +45,12 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
singleline_zhouyu_huanggai
);
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
singleline_zhouyu_huanggai
);
emptyItemDecoration
=
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
50
,
drawable
,
1
);
listItemDecoration
=
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
50
,
drawable
,
0
);
listItemDecoration
=
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
50
,
drawable
,
0
);
mOtherSelectAdapter
=
new
OtherSelectAdapter
(
new
ArrayList
<>());
mOtherSelectAdapter
=
new
OtherSelectAdapter
(
new
ArrayList
<>());
mOtherSelectAdapter
.
setEmptyView
(
getEmptyView
(
R
.
string
.
empty_other_select
));
mOtherSelectAdapter
.
setEmptyView
(
getEmptyView
(
R
.
string
.
empty_other_select
));
mViewBinding
.
recyclerOtherSelcet
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
recyclerOtherSelcet
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
recyclerOtherSelcet
.
setAdapter
(
mOtherSelectAdapter
);
mViewBinding
.
recyclerOtherSelcet
.
setAdapter
(
mOtherSelectAdapter
);
mViewBinding
.
recyclerOtherSelcet
.
addItemDecoration
(
emptyItemDecoration
);
// mOtherSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
// mOtherSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
// @Override
// @Override
...
@@ -90,13 +88,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
...
@@ -90,13 +88,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
mOtherSelectAdapter
.
setNewData
(
pager
.
getList
());
mOtherSelectAdapter
.
setNewData
(
pager
.
getList
());
if
(
pager
.
getList
().
size
()
==
0
)
{
if
(
pager
.
getList
().
size
()
==
0
)
{
mViewBinding
.
recyclerOtherSelcet
.
removeItemDecoration
(
listItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
removeItemDecoration
(
listItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
removeItemDecoration
(
emptyItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
addItemDecoration
(
emptyItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
invalidateItemDecorations
();
mViewBinding
.
recyclerOtherSelcet
.
invalidateItemDecorations
();
}
else
{
}
else
{
mViewBinding
.
recyclerOtherSelcet
.
removeItemDecoration
(
listItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
removeItemDecoration
(
listItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
removeItemDecoration
(
emptyItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
addItemDecoration
(
listItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
addItemDecoration
(
listItemDecoration
);
mViewBinding
.
recyclerOtherSelcet
.
invalidateItemDecorations
();
mViewBinding
.
recyclerOtherSelcet
.
invalidateItemDecorations
();
}
}
...
...
app/src/main/res/layout/dialog_base.xml
View file @
47cc1a85
...
@@ -6,17 +6,18 @@
...
@@ -6,17 +6,18 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/lyt_main_bg"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
android:id=
"@+id/tv_title"
android:id=
"@+id/tv_title"
style=
"@style/dialog_title"
style=
"@style/dialog_title"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
<View
android:layout_marginBottom=
"@dimen/all_padding"
/>
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_kongming"
/>
<ViewStub
<ViewStub
android:id=
"@+id/vs_center"
android:id=
"@+id/vs_center"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/item_inventory_goods.xml
View file @
47cc1a85
...
@@ -6,7 +6,15 @@
...
@@ -6,7 +6,15 @@
<data>
<data>
</data>
</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_bounced_padding"
android:background=
"@drawable/singleline_zhouyu_huanggai"
/>
<android.support.constraint.ConstraintLayout
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -206,6 +214,6 @@
...
@@ -206,6 +214,6 @@
app:layout_constraintTop_toTopOf=
"@id/linearLayout"
/>
app:layout_constraintTop_toTopOf=
"@id/linearLayout"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/bg_service.png
View replaced file @
a9db9497
View file @
47cc1a85
442 KB
|
W:
|
H:
464 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/values/strings.xml
View file @
47cc1a85
...
@@ -483,7 +483,7 @@
...
@@ -483,7 +483,7 @@
<!-- 菜单POS -->
<!-- 菜单POS -->
<string
name=
"menu_cashier"
>
收银
</string>
<string
name=
"menu_cashier"
>
收银
</string>
<string
name=
"menu_service"
>
服务
</string>
<string
name=
"menu_service"
>
服务
</string>
<string
name=
"menu_myself"
>
个人
</string>
<string
name=
"menu_myself"
>
我的
</string>
<string
name=
"menu_billing"
>
开单
</string>
<string
name=
"menu_billing"
>
开单
</string>
<string
name=
"menu_receivables"
>
收款
</string>
<string
name=
"menu_receivables"
>
收款
</string>
<string
name=
"menu_vip"
>
会员
</string>
<string
name=
"menu_vip"
>
会员
</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