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
7a06b3e0
提交
7a06b3e0
authored
6月 21, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改内部展示字段
上级
2438a16e
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
48 行增加
和
37 行删除
+48
-37
ChooseInfoActivity.java
.../workoffice/ui/activity/bat/store/ChooseInfoActivity.java
+14
-7
StoreTradingCarActivity.java
...office/ui/activity/bat/store/StoreTradingCarActivity.java
+25
-22
TradingProCarAdapter.java
...va/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
+5
-4
TradingProDetailAdapter.java
...com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
+1
-1
TradingProductAdapter.java
...a/com/wd/workoffice/ui/adapter/TradingProductAdapter.java
+3
-3
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/ChooseInfoActivity.java
浏览文件 @
7a06b3e0
...
...
@@ -114,7 +114,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
private
List
<
StockBean
>
stockList
=
new
ArrayList
<>();
private
List
<
String
>
stockNameList
=
new
ArrayList
<>();
private
StockBean
chooseStock
;
// Map<String, Object> carMap = new HashMap<>();
// Map<String, Object> carMap = new HashMap<>();
private
List
<
TradingBean
.
RecordsBean
>
tradingProductList
;
private
TradingProductAdapter
tradingProductAdapter
;
private
Map
<
String
,
Object
>
tradeParam
;
...
...
@@ -175,8 +175,8 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
protected
void
initData
()
{
proList
=
new
ArrayList
<>();
if
(
TextUtils
.
equals
(
"3"
,
type
))
{
proAdapter
=
new
StoreProductAdapter
(
R
.
layout
.
item_store_product
,
proList
,
2
);
}
else
{
proAdapter
=
new
StoreProductAdapter
(
R
.
layout
.
item_store_product
,
proList
,
2
);
}
else
{
proAdapter
=
new
StoreProductAdapter
(
R
.
layout
.
item_store_product
,
proList
);
}
...
...
@@ -268,7 +268,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
toast
(
"请选择入库仓库"
);
return
true
;
}
if
(
tradingCarList
.
size
()
==
0
)
{
if
(
tradingCarList
.
size
()
==
0
)
{
toast
(
"购物车没有产品"
);
return
true
;
}
...
...
@@ -709,8 +709,15 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
onMessageEvent
(
ModifyCarEvent
event
)
{
String
pro
=
event
.
getPro
();
if
(
TextUtils
.
equals
(
"6"
,
type
))
{
carList
.
clear
();
carList
.
addAll
(
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
proAdapter
.
notifyDataSetChanged
();
}
else
{
tradingCarList
.
clear
();
tradingCarList
.
addAll
(
JSON
.
parseArray
(
pro
,
TradingBean
.
RecordsBean
.
class
));
tradingProDetailAdapter
.
notifyDataSetChanged
();
}
changeCarBadge
();
}
...
...
@@ -817,7 +824,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
tvSearch
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
tvKey
.
getText
().
toString
())){
if
(
TextUtils
.
isEmpty
(
tvKey
.
getText
().
toString
()))
{
toast
(
"请输入搜索关键字"
);
return
;
}
...
...
@@ -861,14 +868,14 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
if
(
quantity
.
getId
()
==
recordsBean
.
getId
())
{
isHas
=
true
;
recordsBean
.
setChooseNum
(
quantity
.
getChooseNum
());
recordsBean
.
setChooseName
(
data
.
get
(
0
).
get
Nam
e
());
recordsBean
.
setChooseName
(
data
.
get
(
0
).
get
SimpleCod
e
());
recordsBean
.
setChangePro
(
data
.
get
(
0
));
}
}
if
(!
isHas
)
{
quantity
.
setChangePro
(
data
.
get
(
0
));
quantity
.
setChooseName
(
data
.
get
(
0
).
get
Nam
e
());
quantity
.
setChooseName
(
data
.
get
(
0
).
get
SimpleCod
e
());
tradingCarList
.
add
(
quantity
);
}
if
(
data
.
size
()
>
0
)
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingCarActivity.java
浏览文件 @
7a06b3e0
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
store
;
import
android.
os.Bundle
;
import
android.
view.View
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.TradingBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.ui.adapter.TradingProCarAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.MathUtils
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -63,27 +67,26 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
@Override
protected
void
initEvent
()
{
// productAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
// @Override
// public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
// QMUIDialog.MessageDialogBuilder dialog = DialogUtils.okAndCancelDialog(StoreTradingCarActivity.this);
// dialog.setMessage("是否删除").addAction("取消", new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
// dialog.dismiss();
// }
// }).addAction("确定", new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
// dialog.dismiss();
// productList.remove(position);
// productAdapter.notifyDataSetChanged();
// EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(productList)));
// }
// }).show();
// }
// });
productAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
QMUIDialog
.
MessageDialogBuilder
dialog
=
DialogUtils
.
okAndCancelDialog
(
StoreTradingCarActivity
.
this
);
dialog
.
setMessage
(
"是否删除"
).
addAction
(
"取消"
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
}
}).
addAction
(
"确定"
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
productList
.
remove
(
position
);
productAdapter
.
notifyDataSetChanged
();
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
productList
)));
}
}).
show
();
}
});
}
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
浏览文件 @
7a06b3e0
...
...
@@ -27,10 +27,10 @@ public class TradingProCarAdapter extends BaseQuickAdapter<TradingBean.RecordsBe
@Override
protected
void
convert
(
BaseViewHolder
helper
,
TradingBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_top_name
,
item
.
getProductName
());
helper
.
setText
(
R
.
id
.
tv_top_card
,
item
.
getProductS
imp
leCode
());
helper
.
setText
(
R
.
id
.
tv_top_card_name
,
item
.
getProductS
o
leCode
());
helper
.
setText
(
R
.
id
.
tv_top_card
,
item
.
getProductS
o
leCode
());
helper
.
setText
(
R
.
id
.
tv_top_card_name
,
item
.
getProductS
imp
leCode
());
helper
.
setText
(
R
.
id
.
tv_apply_num
,
MathUtils
.
converData
(
item
.
getQuantity
(),
3
));
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
get
Dept
Name
());
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
get
Stock
Name
());
AddAndReduceView
userNum
=
helper
.
getView
(
R
.
id
.
ar_use_num
);
userNum
.
setNumber
(
item
.
getChooseNum
());
userNum
.
setMaxNum
(
item
.
getQuantity
());
...
...
@@ -38,12 +38,13 @@ public class TradingProCarAdapter extends BaseQuickAdapter<TradingBean.RecordsBe
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setChooseNum
(
vs
);
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getChangePro
().
getName
());
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getChangePro
().
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getChangePro
().
getS
o
leCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getChangePro
().
getS
imp
leCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getChangePro
().
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
MathUtils
.
converData
(
item
.
getChangePro
().
getInternalPrice
(),
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
item
.
getChangePro
().
getCarNum
(),
MathUtils
.
converData
(
item
.
getChangePro
().
getInternalPrice
(),
3
),
3
));
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
浏览文件 @
7a06b3e0
...
...
@@ -33,7 +33,7 @@ public class TradingProDetailAdapter extends BaseQuickAdapter<ProductBean.Record
protected
void
convert
(
BaseViewHolder
helper
,
ProductBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getS
o
leCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getS
imp
leCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
));
CheckBox
cbChoose
=
helper
.
getView
(
R
.
id
.
cb_check
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProductAdapter.java
浏览文件 @
7a06b3e0
...
...
@@ -25,10 +25,10 @@ public class TradingProductAdapter extends BaseQuickAdapter<TradingBean.RecordsB
@Override
protected
void
convert
(
BaseViewHolder
helper
,
TradingBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductName
()
);
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getProductS
impleCode
()
);
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getProductS
o
leCode
());
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getProductS
oleCode
()
);
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getProductS
imp
leCode
());
helper
.
setText
(
R
.
id
.
tv_num
,
String
.
valueOf
(
item
.
getQuantity
()));
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
get
Dept
Name
());
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
get
Stock
Name
());
if
(!
TextUtils
.
isEmpty
(
item
.
getChooseNum
()))
{
helper
.
setVisible
(
R
.
id
.
ll_car
,
true
);
helper
.
setText
(
R
.
id
.
tv_pro
,
item
.
getChooseName
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论