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
1f774d92
提交
1f774d92
authored
6月 11, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.限制三位小数
2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级
b9f9f08c
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
76 行增加
和
49 行删除
+76
-49
AddCrucibleCarActivity.java
...koffice/ui/activity/bat/order/AddCrucibleCarActivity.java
+2
-2
AddCrucibleConfirmActivity.java
...ice/ui/activity/bat/order/AddCrucibleConfirmActivity.java
+2
-2
OutOrderDetailActivity.java
...koffice/ui/activity/bat/order/OutOrderDetailActivity.java
+23
-19
ProductConfirmActivity.java
...koffice/ui/activity/bat/order/ProductConfirmActivity.java
+1
-1
ProductOrderApplyDetailActivity.java
...i/activity/bat/order/ProductOrderApplyDetailActivity.java
+1
-1
StoreSaleCarActivity.java
...orkoffice/ui/activity/bat/store/StoreSaleCarActivity.java
+2
-2
StoreSaleConfirmActivity.java
...ffice/ui/activity/bat/store/StoreSaleConfirmActivity.java
+1
-1
StoreTradingCarActivity.java
...office/ui/activity/bat/store/StoreTradingCarActivity.java
+1
-1
StoreTradingConfirmActivity.java
...ce/ui/activity/bat/store/StoreTradingConfirmActivity.java
+1
-1
WorkProDetailActivity.java
...orkoffice/ui/activity/bat/work/WorkProDetailActivity.java
+2
-1
WorkProSearchActivity.java
...orkoffice/ui/activity/bat/work/WorkProSearchActivity.java
+2
-1
AddCrucibleCarAdapter.java
...a/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
+1
-1
StoreCarAdapter.java
...in/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
+3
-3
StoreProductAdapter.java
...ava/com/wd/workoffice/ui/adapter/StoreProductAdapter.java
+2
-1
TradingConfimProAdapter.java
...com/wd/workoffice/ui/adapter/TradingConfimProAdapter.java
+1
-1
TradingProCarAdapter.java
...va/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
+3
-3
TradingProDetailAdapter.java
...com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
+2
-1
WorkProductAdapter.java
...java/com/wd/workoffice/ui/adapter/WorkProductAdapter.java
+2
-1
MathUtils.java
app/src/main/java/com/wd/workoffice/util/MathUtils.java
+6
-6
activity_out_order.xml
app/src/main/res/layout/activity_out_order.xml
+18
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleCarActivity.java
浏览文件 @
1f774d92
...
...
@@ -101,7 +101,7 @@ public class AddCrucibleCarActivity extends WorkToolBarActivity {
public
void
onViewClicked
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
// startActivity(StoreSaleConfirmActivity.class, "pro", JSON.toJSONString(productList),
// "subProcess", getIntent().getStringExtra("subProcess"),
...
...
@@ -142,7 +142,7 @@ public class AddCrucibleCarActivity extends WorkToolBarActivity {
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
recordsBean
.
getInternalPrice
()+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleConfirmActivity.java
浏览文件 @
1f774d92
...
...
@@ -174,7 +174,7 @@ public class AddCrucibleConfirmActivity extends WorkToolBarActivity {
data
.
put
(
"productId"
,
recordsBean
.
getId
());
data
.
put
(
"type"
,
"PDS"
);
// data.put("tranFromStockId", recordsBean.getCarPrice());
data
.
put
(
"innerPrice"
,
recordsBean
.
getInternalPrice
(
));
data
.
put
(
"innerPrice"
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
));
data
.
put
(
"customerBranchFactoryId"
,
recordsBean
.
getFactoryId
());
//3.分厂客户ID
data
.
put
(
"outerPrice"
,
recordsBean
.
getCarPrice
());
data
.
put
(
"productCount"
,
recordsBean
.
getCarNum
());
...
...
@@ -299,7 +299,7 @@ public class AddCrucibleConfirmActivity extends WorkToolBarActivity {
tvNum
.
setText
(
"共 "
.
concat
(
proList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
(),
recordsBean
.
getInternalPrice
()
+
""
,
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
(),
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/OutOrderDetailActivity.java
浏览文件 @
1f774d92
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.
text.Editab
le
;
import
android.
os.Bund
le
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
...
...
@@ -18,9 +17,7 @@ import com.wd.workoffice.R;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckAddStockEvent
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
...
...
@@ -43,7 +40,6 @@ import butterknife.BindView;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
/**
...
...
@@ -119,6 +115,8 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
ImageView
ivSetting
;
@BindView
(
R
.
id
.
rl_set
)
RelativeLayout
rlSet
;
@BindView
(
R
.
id
.
ll_see_more
)
LinearLayout
llSeeMore
;
private
OrderDetail
dataBean
;
private
List
<
OrderDetail
.
OrderFlowsBean
>
flowList
;
private
OrderProcessAdapter
flowAdapter
;
...
...
@@ -301,10 +299,10 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
"identity"
,
identity
,
"status"
,
dataBean
.
getStatus
()
+
""
,
"orderType"
,
dataBean
.
getExpandInfo
().
getOrderType
(),
"enterStockType"
,
dataBean
.
getEnterStockType
(),
"deptId"
,
dataBean
.
getLaunchDeptId
()+
""
,
"returnNum"
,
TextUtils
.
equals
(
dataBean
.
getEnterStockType
(),
"1"
)
?
proList
.
get
(
position
).
getCanOutReturnSum
():
proList
.
get
(
position
).
getCanUsedReturnSum
(),
"enterStockType"
,
dataBean
.
getEnterStockType
(),
"deptId"
,
dataBean
.
getLaunchDeptId
()
+
""
,
"returnNum"
,
TextUtils
.
equals
(
dataBean
.
getEnterStockType
(),
"1"
)
?
proList
.
get
(
position
).
getCanOutReturnSum
()
:
proList
.
get
(
position
).
getCanUsedReturnSum
(),
"num"
,
proList
.
get
(
position
).
getCanUseProductSum
()
+
""
,
"product"
,
proList
.
get
(
position
).
getProductName
(),
"simpleCode"
,
proList
.
get
(
position
).
getProductSimpleCode
(),
...
...
@@ -345,16 +343,16 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
settingDialog
.
show
();
break
;
case
R
.
id
.
tv_refuse
:
if
(
status
==
200
)
{
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
if
(
status
==
200
)
{
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
checkDialog
(
2
);
}
break
;
case
R
.
id
.
tv_agree
:
if
(
status
==
200
)
{
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
if
(
status
==
200
)
{
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
checkDialog
(
1
);
}
break
;
...
...
@@ -386,11 +384,11 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check_order
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvPrice
=
view
.
findViewById
(
R
.
id
.
tv_price
);
tvPrice
.
setText
(
MathUtils
.
converData
(
dataBean
.
getLaunchOrderAmount
(),
3
));
tvPrice
.
setText
(
MathUtils
.
converData
(
dataBean
.
getLaunchOrderAmount
(),
3
));
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
WorkUtils
.
addNumListener
(
etRemark
,
tvNum
);
WorkUtils
.
addNumListener
(
etRemark
,
tvNum
);
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
@@ -481,7 +479,6 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
}
private
void
checkReceiveDialog
(
int
status
,
String
id
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check
,
null
);
...
...
@@ -491,7 +488,7 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
WorkUtils
.
addNumListener
(
etRemark
,
tvNum
);
WorkUtils
.
addNumListener
(
etRemark
,
tvNum
);
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
@@ -545,4 +542,11 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
}
});
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductConfirmActivity.java
浏览文件 @
1f774d92
...
...
@@ -209,7 +209,7 @@ public class ProductConfirmActivity extends WorkToolBarActivity {
private
void
changeNumAndPrice
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
toList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
(),
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
(),
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
tvBase5
.
setText
(
String
.
valueOf
(
allPrice
));
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductOrderApplyDetailActivity.java
浏览文件 @
1f774d92
...
...
@@ -172,7 +172,7 @@ public class ProductOrderApplyDetailActivity extends WorkToolBarActivity {
private
void
changeNumAndPrice
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
toList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
tvBase5
.
setText
(
String
.
valueOf
(
allPrice
));
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleCarActivity.java
浏览文件 @
1f774d92
...
...
@@ -107,7 +107,7 @@ public class StoreSaleCarActivity extends WorkToolBarActivity {
public
void
onViewClicked
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
if
(
productList
.
size
()
==
0
)
{
toast
(
"购物车里没有产品哦"
);
...
...
@@ -145,7 +145,7 @@ public class StoreSaleCarActivity extends WorkToolBarActivity {
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
(),
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
(),
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleConfirmActivity.java
浏览文件 @
1f774d92
...
...
@@ -182,7 +182,7 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
data
.
put
(
"productId"
,
recordsBean
.
getId
());
data
.
put
(
"type"
,
"PDS"
);
// data.put("tranFromStockId", recordsBean.getCarPrice());
data
.
put
(
"innerPrice"
,
recordsBean
.
getInternalPrice
(
));
data
.
put
(
"innerPrice"
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
));
data
.
put
(
"customerBranchFactoryId"
,
recordsBean
.
getFactoryId
());
//3.分厂客户ID
data
.
put
(
"outerPrice"
,
recordsBean
.
getCarPrice
());
data
.
put
(
"productCount"
,
recordsBean
.
getCarNum
());
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingCarActivity.java
浏览文件 @
1f774d92
...
...
@@ -119,7 +119,7 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
startActivity
(
StoreTradingConfirmActivity
.
class
,
"pro"
,
getIntent
().
getStringExtra
(
"pro"
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingConfirmActivity.java
浏览文件 @
1f774d92
...
...
@@ -351,7 +351,7 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
tvNum
.
setText
(
"共 "
.
concat
(
proList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
)
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkProDetailActivity.java
浏览文件 @
1f774d92
...
...
@@ -14,6 +14,7 @@ import com.wd.workoffice.bean.ProDetail;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
butterknife.BindView
;
...
...
@@ -97,7 +98,7 @@ public class WorkProDetailActivity extends WorkToolBarActivity {
tvKind
.
setText
(
proBean
.
getOfKind
());
tvUnit
.
setText
(
proBean
.
getUnit
());
tvWeight
.
setText
(
String
.
valueOf
(
proBean
.
getWeight
()));
tvPrice
.
setText
(
String
.
valueOf
(
proBean
.
getInternalPrice
()
));
tvPrice
.
setText
(
MathUtils
.
converData
(
proBean
.
getInternalPrice
(),
3
));
tvStatus
.
setText
(
TextUtils
.
equals
(
proBean
.
getStatus
(),
"1"
)
?
"正常"
:
"冻结"
);
tvProcess
.
setText
(
proBean
.
getProcessType
());
}
else
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkProSearchActivity.java
浏览文件 @
1f774d92
...
...
@@ -20,6 +20,7 @@ import com.wd.workoffice.presenter.WorkProPresenter;
import
com.wd.workoffice.ui.adapter.ProSupplierAdapter
;
import
com.wd.workoffice.ui.adapter.SaleSupplierAdapter
;
import
com.wd.workoffice.ui.adapter.WorkProductAdapter
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
java.util.ArrayList
;
...
...
@@ -261,7 +262,7 @@ public class WorkProSearchActivity extends WorkBaseActivity implements WorkProCo
shelfAction
=
"down"
;
tvOk
.
setText
(
"下架"
);
}
tvPrice
.
setText
(
String
.
valueOf
(
data
.
getInternalPrice
()
).
concat
(
"/"
).
concat
(
data
.
getUnit
()));
tvPrice
.
setText
(
MathUtils
.
converData
(
data
.
getInternalPrice
(),
3
).
concat
(
"/"
).
concat
(
data
.
getUnit
()));
tvName
.
setText
(
data
.
getName
());
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
浏览文件 @
1f774d92
...
...
@@ -42,7 +42,7 @@ public class AddCrucibleCarAdapter extends BaseQuickAdapter<ProductBean.RecordsB
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)));
helper
.
setText
(
R
.
id
.
tv_unit
,
MathUtils
.
converData
(
item
.
getWeight
(),
3
).
concat
(
"吨"
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
(),
item
.
getInternalPrice
()
+
""
,
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
(),
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)
,
3
));
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setMaxNum
(
item
.
getCanUseProductSum
());
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
浏览文件 @
1f774d92
...
...
@@ -47,7 +47,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)));
helper
.
setText
(
R
.
id
.
tv_unit
,
MathUtils
.
converData
(
item
.
getWeight
(),
3
).
concat
(
"吨"
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
(),
item
.
getInternalPrice
()
+
""
,
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
(),
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)
,
3
));
if
(
type
==
1
)
{
helper
.
addOnClickListener
(
R
.
id
.
rl_choose_dep
);
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
...
...
@@ -64,7 +64,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
,
String
.
valueOf
(
item
.
getInternalPrice
()
),
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
...
...
@@ -103,7 +103,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
return
;
}
item
.
setCarPrice
(
s
.
toString
());
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
(),
String
.
valueOf
(
item
.
getInternalPrice
()
),
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
(),
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/StoreProductAdapter.java
浏览文件 @
1f774d92
...
...
@@ -5,6 +5,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.util.MathUtils
;
import
java.util.List
;
...
...
@@ -32,7 +33,7 @@ public class StoreProductAdapter extends BaseQuickAdapter<ProductBean.RecordsBea
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
String
.
valueOf
(
item
.
getInternalPrice
()
)));
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
addOnClickListener
(
R
.
id
.
tv_cart
);
if
(
type
==
1
)
{
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingConfimProAdapter.java
浏览文件 @
1f774d92
...
...
@@ -36,7 +36,7 @@ public class TradingConfimProAdapter 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_num
,
String
.
valueOf
(
item
.
getCarNum
()));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
getInternalPrice
()
+
""
,
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
),
3
));
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
if
(!
TextUtils
.
isEmpty
(
item
.
getUrl
())){
helper
.
setText
(
R
.
id
.
tv_upload
,
"已上传,点击替换"
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
浏览文件 @
1f774d92
...
...
@@ -35,15 +35,15 @@ public class TradingProCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBe
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
valueOf
(
item
.
getInternalPrice
()
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
getInternalPrice
()
+
""
,
3
));
helper
.
setText
(
R
.
id
.
tv_price
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
item
.
getCarNum
()
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)
,
3
));
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setNumber
(
item
.
getCarNum
());
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
vs
+
""
,
item
.
getInternalPrice
()
+
""
,
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
vs
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)
,
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
浏览文件 @
1f774d92
...
...
@@ -9,6 +9,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.LogisticDetailBean
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.util.MathUtils
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -36,7 +37,7 @@ public class TradingProDetailAdapter extends BaseQuickAdapter<ProductBean.Record
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getSoleCode
()
);
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
valueOf
(
item
.
getInternalPrice
()
));
helper
.
setText
(
R
.
id
.
tv_price
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
));
CheckBox
cbChoose
=
helper
.
getView
(
R
.
id
.
cb_check
);
cbChoose
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/WorkProductAdapter.java
浏览文件 @
1f774d92
...
...
@@ -6,6 +6,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
java.util.List
;
...
...
@@ -26,7 +27,7 @@ public class WorkProductAdapter extends BaseQuickAdapter<ProductBean.RecordsBean
helper
.
setText
(
R
.
id
.
tv_card
,
"品号:"
+
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_img_card
,
"图号:"
+
item
.
getSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
"规格:"
+
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
String
.
valueOf
(
item
.
getInternalPrice
()
)));
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
)));
helper
.
addOnClickListener
(
R
.
id
.
btn_modify
);
helper
.
addOnClickListener
(
R
.
id
.
btn_on_sale
);
if
(
item
.
getIsExpectOut
()
==
0
)
{
//未上架
...
...
app/src/main/java/com/wd/workoffice/util/MathUtils.java
浏览文件 @
1f774d92
...
...
@@ -82,7 +82,7 @@ public class MathUtils {
}
BigDecimal
bg
=
new
BigDecimal
(
value
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#######################.###"
);
return
decimalFormat
.
format
(
bg
.
setScale
(
scale
,
RoundingMode
.
HALF_UP
));
return
decimalFormat
.
format
(
bg
.
setScale
(
scale
,
RoundingMode
.
DOWN
));
}
public
static
String
converData
(
double
value
,
Integer
scale
)
{
...
...
@@ -94,7 +94,7 @@ public class MathUtils {
}
BigDecimal
bg
=
new
BigDecimal
(
strValue
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#######################.###"
);
return
decimalFormat
.
format
(
bg
.
setScale
(
scale
,
RoundingMode
.
HALF_UP
));
return
decimalFormat
.
format
(
bg
.
setScale
(
scale
,
RoundingMode
.
DOWN
));
}
...
...
@@ -108,7 +108,7 @@ public class MathUtils {
BigDecimal
b1
=
new
BigDecimal
(
v1
.
trim
());
BigDecimal
b2
=
new
BigDecimal
(
v2
.
trim
());
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#######################.###"
);
return
decimalFormat
.
format
(
b1
.
multiply
(
b2
).
setScale
(
scale
,
RoundingMode
.
HALF_UP
));
return
decimalFormat
.
format
(
b1
.
multiply
(
b2
).
setScale
(
scale
,
RoundingMode
.
DOWN
));
}
public
static
String
add
(
String
v1
,
String
v2
,
Integer
scale
)
{
...
...
@@ -121,7 +121,7 @@ public class MathUtils {
BigDecimal
b1
=
new
BigDecimal
(
v1
.
trim
());
BigDecimal
b2
=
new
BigDecimal
(
v2
.
trim
());
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#######################.###"
);
return
decimalFormat
.
format
(
b1
.
add
(
b2
).
setScale
(
scale
,
RoundingMode
.
HALF_UP
));
return
decimalFormat
.
format
(
b1
.
add
(
b2
).
setScale
(
scale
,
RoundingMode
.
DOWN
));
}
public
static
String
subtract
(
String
v1
,
String
v2
,
Integer
scale
)
{
...
...
@@ -134,7 +134,7 @@ public class MathUtils {
BigDecimal
b1
=
new
BigDecimal
(
v1
.
trim
());
BigDecimal
b2
=
new
BigDecimal
(
v2
.
trim
());
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#######################.###"
);
return
decimalFormat
.
format
(
b1
.
subtract
(
b2
).
setScale
(
scale
,
RoundingMode
.
HALF_UP
));
return
decimalFormat
.
format
(
b1
.
subtract
(
b2
).
setScale
(
scale
,
RoundingMode
.
DOWN
));
}
public
static
String
divide
(
String
v1
,
String
v2
,
Integer
scale
)
{
...
...
@@ -147,7 +147,7 @@ public class MathUtils {
BigDecimal
b1
=
new
BigDecimal
(
v1
.
trim
());
BigDecimal
b2
=
new
BigDecimal
(
v2
.
trim
());
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#######################.###"
);
return
decimalFormat
.
format
(
b1
.
divide
(
b2
).
setScale
(
scale
,
RoundingMode
.
HALF_UP
));
return
decimalFormat
.
format
(
b1
.
divide
(
b2
).
setScale
(
scale
,
RoundingMode
.
DOWN
));
}
...
...
app/src/main/res/layout/activity_out_order.xml
浏览文件 @
1f774d92
...
...
@@ -147,6 +147,24 @@
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
/>
<LinearLayout
android:id=
"@+id/ll_see_more"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:paddingVertical=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"查看更多"
/>
<ImageView
android:layout_width=
"15mm"
android:layout_height=
"15mm"
android:src=
"@mipmap/arrow_down"
/>
</LinearLayout>
<View
style=
"@style/ViewX"
/>
<LinearLayout
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论