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
3d7b0427
提交
3d7b0427
authored
6月 08, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改采购小数点
2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级
1890950a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
9 行增加
和
10 行删除
+9
-10
DeviceBuyCarActivity.java
...workoffice/ui/activity/bat/work/DeviceBuyCarActivity.java
+4
-2
DeviceBuyProductActivity.java
...office/ui/activity/bat/work/DeviceBuyProductActivity.java
+0
-5
DeviceCarAdapter.java
...n/java/com/wd/workoffice/ui/adapter/DeviceCarAdapter.java
+4
-2
activity_use_apply_detail.xml
app/src/main/res/layout/activity_use_apply_detail.xml
+1
-1
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/DeviceBuyCarActivity.java
浏览文件 @
3d7b0427
...
@@ -22,7 +22,9 @@ import org.greenrobot.eventbus.Subscribe;
...
@@ -22,7 +22,9 @@ import org.greenrobot.eventbus.Subscribe;
import
org.greenrobot.eventbus.ThreadMode
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
...
@@ -101,7 +103,7 @@ public class DeviceBuyCarActivity extends WorkToolBarActivity {
...
@@ -101,7 +103,7 @@ public class DeviceBuyCarActivity extends WorkToolBarActivity {
public
void
onViewClicked
()
{
public
void
onViewClicked
()
{
String
allPrice
=
""
;
String
allPrice
=
""
;
for
(
DeviceBean
.
RecordsBean
recordsBean
:
productList
)
{
for
(
DeviceBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getCarPrice
()+
""
,
2
),
2
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
recordsBean
.
getCarPrice
(),
3
),
3
);
}
}
startActivity
(
DeviceBuyConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
startActivity
(
DeviceBuyConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
"depId"
,
getIntent
().
getStringExtra
(
"depId"
),
"depId"
,
getIntent
().
getStringExtra
(
"depId"
),
...
@@ -130,7 +132,7 @@ public class DeviceBuyCarActivity extends WorkToolBarActivity {
...
@@ -130,7 +132,7 @@ public class DeviceBuyCarActivity extends WorkToolBarActivity {
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()
+
""
).
concat
(
" 件"
));
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
String
allPrice
=
""
;
for
(
DeviceBean
.
RecordsBean
recordsBean
:
productList
)
{
for
(
DeviceBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getCarPrice
()+
""
,
2
),
2
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
recordsBean
.
getCarPrice
(),
3
),
3
);
}
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/DeviceBuyProductActivity.java
浏览文件 @
3d7b0427
...
@@ -61,11 +61,6 @@ public class DeviceBuyProductActivity extends WorkToolBarActivity {
...
@@ -61,11 +61,6 @@ public class DeviceBuyProductActivity extends WorkToolBarActivity {
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
}
private
void
openDialog
(
DeviceBean
.
RecordsBean
data
)
{
private
void
openDialog
(
DeviceBean
.
RecordsBean
data
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/DeviceCarAdapter.java
浏览文件 @
3d7b0427
...
@@ -14,6 +14,7 @@ import com.wd.workoffice.bean.DeviceBean;
...
@@ -14,6 +14,7 @@ import com.wd.workoffice.bean.DeviceBean;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -37,19 +38,20 @@ public class DeviceCarAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, B
...
@@ -37,19 +38,20 @@ public class DeviceCarAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, B
protected
void
convert
(
BaseViewHolder
helper
,
DeviceBean
.
RecordsBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
DeviceBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getTitle
());
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getTitle
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpecification
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpecification
());
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
getCarPrice
()+
""
,
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
,
item
.
getCarPrice
(),
3
));
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
@Override
public
void
OnNumberChanged
(
String
vs
)
{
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setCarNum
(
vs
);
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
+
""
,
item
.
getCarPrice
(),
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
+
""
,
item
.
getCarPrice
(),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
}
});
});
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
etPrice
.
setText
(
item
.
getCarPrice
());
etPrice
.
setText
(
item
.
getCarPrice
());
WorkUtils
.
addDecimalsListener
(
etPrice
);
etPrice
.
addTextChangedListener
(
new
TextWatcher
()
{
etPrice
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
...
...
app/src/main/res/layout/activity_use_apply_detail.xml
浏览文件 @
3d7b0427
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
领用
备注"
android:text=
"
审核
备注"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论