Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
3ba36dd6
提交
3ba36dd6
authored
6月 29, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改购物车删除逻辑
上级
8410b4df
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
41 行增加
和
10 行删除
+41
-10
ChooseInfoActivity.java
.../workoffice/ui/activity/bat/store/ChooseInfoActivity.java
+10
-1
StoreTradingCarActivity.java
...office/ui/activity/bat/store/StoreTradingCarActivity.java
+4
-0
TradingProCarAdapter.java
...va/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
+1
-0
item_trading_product_car.xml
app/src/main/res/layout/item_trading_product_car.xml
+26
-9
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/ChooseInfoActivity.java
浏览文件 @
3ba36dd6
...
...
@@ -713,7 +713,12 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
if
(
TextUtils
.
equals
(
"6"
,
type
))
{
tradingCarList
.
clear
();
tradingCarList
.
addAll
(
JSON
.
parseArray
(
pro
,
TradingBean
.
RecordsBean
.
class
));
for
(
TradingBean
.
RecordsBean
recordsBean
:
tradingCarList
)
{
for
(
TradingBean
.
RecordsBean
tradingPro
:
tradingProductList
)
{
//购物车信息置空
tradingPro
.
setChooseNum
(
null
);
tradingPro
.
setChooseName
(
null
);
tradingPro
.
setChangePro
(
null
);
}
for
(
TradingBean
.
RecordsBean
recordsBean
:
tradingCarList
)
{
//判断购物车信息,添加信息
for
(
TradingBean
.
RecordsBean
bean
:
tradingProductList
)
{
if
(
bean
.
getId
()
==
recordsBean
.
getId
())
{
bean
.
setChooseNum
(
recordsBean
.
getChooseNum
());
...
...
@@ -727,6 +732,10 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
}
else
{
carList
.
clear
();
carList
.
addAll
(
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
for
(
ProductBean
.
RecordsBean
proInfo
:
proList
)
{
//购物车信息置空
proInfo
.
setCarNum
(
null
);
proInfo
.
setCarPrice
(
null
);
}
for
(
ProductBean
.
RecordsBean
recordsBean
:
carList
)
{
for
(
ProductBean
.
RecordsBean
bean
:
proList
)
{
if
(
bean
.
getId
()
==
recordsBean
.
getId
())
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingCarActivity.java
浏览文件 @
3ba36dd6
...
...
@@ -96,6 +96,10 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
@OnClick
(
R
.
id
.
tv_ok
)
public
void
onViewClicked
()
{
if
(
productList
.
size
()
==
0
)
{
toast
(
"购物车里没有产品哦"
);
return
;
}
String
allPrice
=
""
;
for
(
TradingBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getChangePro
().
getCarNum
()
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
浏览文件 @
3ba36dd6
...
...
@@ -31,6 +31,7 @@ public class TradingProCarAdapter extends BaseQuickAdapter<TradingBean.RecordsBe
helper
.
setText
(
R
.
id
.
tv_top_card_name
,
item
.
getProductSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_apply_num
,
MathUtils
.
converData
(
item
.
getQuantity
(),
3
));
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
getStockName
());
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
userNum
=
helper
.
getView
(
R
.
id
.
ar_use_num
);
userNum
.
setNumber
(
item
.
getChooseNum
());
userNum
.
setMaxNum
(
item
.
getQuantity
());
...
...
app/src/main/res/layout/item_trading_product_car.xml
浏览文件 @
3ba36dd6
...
...
@@ -2,11 +2,12 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -15,13 +16,28 @@
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<TextView
android:id=
"@+id/tv_top_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"图号TH82739857"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_top_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"图号TH82739857"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_delete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"删除"
android:layout_alignParentRight=
"true"
android:paddingHorizontal=
"5mm"
android:textColor=
"@color/red"
android:textSize=
"14sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -146,11 +162,12 @@
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"置换产品信息"
android:layout_marginTop=
"10mm"
android:text=
"置换产品信息"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论