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
1b2ddf5c
提交
1b2ddf5c
authored
6月 05, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改数字增减框bug
2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级
36d33404
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
77 行增加
和
78 行删除
+77
-78
AddCrucibleProductActivity.java
...ice/ui/activity/bat/order/AddCrucibleProductActivity.java
+6
-7
ProductOrderProActivity.java
...office/ui/activity/bat/order/ProductOrderProActivity.java
+4
-15
SendApplyAddActivity.java
...orkoffice/ui/activity/bat/order/SendApplyAddActivity.java
+18
-1
ChooseInfoActivity.java
.../workoffice/ui/activity/bat/store/ChooseInfoActivity.java
+6
-13
StoreSaleCarActivity.java
...orkoffice/ui/activity/bat/store/StoreSaleCarActivity.java
+12
-6
StoreTradingCarActivity.java
...office/ui/activity/bat/store/StoreTradingCarActivity.java
+3
-9
StoreTradingProductActivity.java
...ce/ui/activity/bat/store/StoreTradingProductActivity.java
+3
-4
AddCrucibleCarAdapter.java
...a/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
+3
-3
StoreCarAdapter.java
...in/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
+9
-9
WorkSendApplyAddAdapter.java
...com/wd/workoffice/ui/adapter/WorkSendApplyAddAdapter.java
+3
-2
AddAndReduceView.java
.../main/java/com/wd/workoffice/widget/AddAndReduceView.java
+1
-1
activity_treading_shopcar.xml
app/src/main/res/layout/activity_treading_shopcar.xml
+1
-1
item_add_crucible_double.xml
app/src/main/res/layout/item_add_crucible_double.xml
+1
-1
item_send_apply_add.xml
app/src/main/res/layout/item_send_apply_add.xml
+4
-3
view_add_cart_trading.xml
app/src/main/res/layout/view_add_cart_trading.xml
+1
-1
view_add_remove.xml
app/src/main/res/layout/view_add_remove.xml
+1
-1
view_choose_pro_from.xml
app/src/main/res/layout/view_choose_pro_from.xml
+1
-1
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleProductActivity.java
浏览文件 @
1b2ddf5c
...
...
@@ -20,7 +20,6 @@ import com.wd.workoffice.bean.workEnum.PermissionType;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity
;
import
com.wd.workoffice.ui.adapter.StoreProductAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -65,13 +64,13 @@ public class AddCrucibleProductActivity extends WorkToolBarActivity {
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_add_cart_double
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
AddAndReduce
Double
View
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
AddAndReduceView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
num
.
setMaxNum
(
data
.
getCanUseProductSum
());
EditText
etPrice
=
view
.
findViewById
(
R
.
id
.
et_price
);
for
(
ProductBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
data
.
getId
()
==
recordsBean
.
getId
())
{
etPrice
.
setText
(
recordsBean
.
getCarPrice
());
num
.
setNumber
(
recordsBean
.
getCar
Double
Num
());
num
.
setNumber
(
recordsBean
.
getCarNum
());
}
}
builder
.
setView
(
view
);
...
...
@@ -83,7 +82,7 @@ public class AddCrucibleProductActivity extends WorkToolBarActivity {
toast
(
"请填写外部价格"
);
return
;
}
if
(
num
.
getNumber
(
)
==
0
d
)
{
if
(
Double
.
valueOf
(
num
.
getNumber
()
)
==
0
d
)
{
toast
(
"请填写数量"
);
return
;
}
...
...
@@ -107,17 +106,17 @@ public class AddCrucibleProductActivity extends WorkToolBarActivity {
* @param number 数量
* @param price 单价
*/
private
void
addCart
(
ProductBean
.
RecordsBean
chooseProduct
,
double
number
,
String
price
)
{
private
void
addCart
(
ProductBean
.
RecordsBean
chooseProduct
,
String
number
,
String
price
)
{
boolean
isHas
=
false
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
chooseProduct
.
getId
()
==
recordsBean
.
getId
())
{
isHas
=
true
;
recordsBean
.
setCar
Double
Num
(
number
);
recordsBean
.
setCarNum
(
number
);
recordsBean
.
setCarPrice
(
price
);
}
}
if
(!
isHas
)
{
chooseProduct
.
setCar
Double
Num
(
number
);
chooseProduct
.
setCarNum
(
number
);
chooseProduct
.
setCarPrice
(
price
);
carList
.
add
(
chooseProduct
);
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductOrderProActivity.java
浏览文件 @
1b2ddf5c
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.Button
;
...
...
@@ -9,25 +8,16 @@ import android.widget.RelativeLayout;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProAddBean
;
import
com.wd.workoffice.bean.ProPriceBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.TicketDetailBean
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkFinancialReceiveTicketSubmitActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkFinancialTicketSubmitActivity
;
import
com.wd.workoffice.ui.adapter.ProAddAdapter
;
import
com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -44,7 +34,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
;
/**
...
...
@@ -86,13 +75,13 @@ public class ProductOrderProActivity extends WorkToolBarActivity {
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
AddAndReduce
Double
View
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
AddAndReduceView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
TextView
etPrice
=
view
.
findViewById
(
R
.
id
.
et_price
);
etPrice
.
setClickable
(
false
);
for
(
ProAddBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
data
.
getId
()
==
recordsBean
.
getId
())
{
// etPrice.setText(recordsBean.getCarPrice());
num
.
setNumber
(
Double
.
valueOf
(
recordsBean
.
getCarNum
()
));
num
.
setNumber
(
recordsBean
.
getCarNum
(
));
}
}
etPrice
.
setText
(
String
.
valueOf
(
data
.
getCanPackageSum
()));
...
...
@@ -102,7 +91,7 @@ public class ProductOrderProActivity extends WorkToolBarActivity {
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
num
.
getNumber
(
)
==
0
d
)
{
if
(
Double
.
valueOf
(
num
.
getNumber
()
)
==
0
d
)
{
toast
(
"请填写数量"
);
return
;
}
...
...
@@ -127,7 +116,7 @@ public class ProductOrderProActivity extends WorkToolBarActivity {
* @param chooseProduct 产品
* @param number 数量
*/
private
void
addCart
(
ProAddBean
.
RecordsBean
chooseProduct
,
double
number
)
{
private
void
addCart
(
ProAddBean
.
RecordsBean
chooseProduct
,
String
number
)
{
boolean
isHas
=
false
;
for
(
ProAddBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
chooseProduct
.
getId
()
==
recordsBean
.
getId
())
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SendApplyAddActivity.java
浏览文件 @
1b2ddf5c
...
...
@@ -317,7 +317,24 @@ public class SendApplyAddActivity extends WorkToolBarActivity {
@Subscribe
public
void
refresh
(
SendWeightEvent
event
)
{
coverProInfo
();
Map
<
Integer
,
Boolean
>
isChoose
=
dataAdapter
.
getIsChoose
();
List
<
JSONObject
>
info
=
new
ArrayList
<>();
String
totalWeight
=
"0"
;
for
(
Map
.
Entry
<
Integer
,
Boolean
>
entry
:
isChoose
.
entrySet
())
{
if
(
entry
.
getValue
())
{
OrderDetail
.
OrderItemsBean
recordsBean
=
dataList
.
get
(
entry
.
getKey
());
JSONObject
returnData
=
new
JSONObject
();
if
(
TextUtils
.
isEmpty
(
recordsBean
.
getChooseNum
())
||
Double
.
valueOf
(
recordsBean
.
getChooseNum
())
==
0
d
)
{
}
totalWeight
=
MathUtils
.
add
(
totalWeight
,
MathUtils
.
multiply
(
recordsBean
.
getChooseNum
(),
String
.
valueOf
(
recordsBean
.
getProductWeight
()),
3
),
3
);
returnData
.
put
(
"productId"
,
recordsBean
.
getProductId
());
returnData
.
put
(
"productAmount"
,
recordsBean
.
getChooseNum
());
info
.
add
(
returnData
);
}
}
tvWeight
.
setText
(
totalWeight
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/ChooseInfoActivity.java
浏览文件 @
1b2ddf5c
...
...
@@ -16,7 +16,6 @@ import com.alibaba.fastjson.JSON;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProcessBean
;
import
com.wd.workoffice.bean.ProductBean
;
...
...
@@ -27,15 +26,12 @@ import com.wd.workoffice.bean.workEnum.PagePermissionType;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.contract.BatChooseInfoContract
;
import
com.wd.workoffice.presenter.BatChooseInfoPresenter
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.StoreProductAdapter
;
import
com.wd.workoffice.ui.adapter.TradingProDetailAdapter
;
import
com.wd.workoffice.ui.adapter.TradingProductAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -54,8 +50,6 @@ import androidx.recyclerview.widget.RecyclerView;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
/**
* 选择数据
...
...
@@ -93,7 +87,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
private
Integer
clientId
;
private
BatChooseInfoPresenter
batChooseInfoPresenter
;
private
List
<
String
>
processNameList
=
new
ArrayList
<>();
private
List
<
ProcessBean
>
processList
=
new
ArrayList
<>();
private
List
<
ProcessBean
>
processList
=
new
ArrayList
<>();
private
ProcessBean
chooseProcess
;
private
QMUIDialog
.
MenuDialogBuilder
processDialog
;
private
QMUIDialog
.
MenuDialogBuilder
stockDialog
;
...
...
@@ -101,7 +95,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
private
List
<
ProductBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
private
Integer
supplyId
;
private
Map
<
String
,
Object
>
stockParam
;
private
List
<
StockBean
>
stockList
=
new
ArrayList
<>();
private
List
<
StockBean
>
stockList
=
new
ArrayList
<>();
private
List
<
String
>
stockNameList
=
new
ArrayList
<>();
private
StockBean
chooseStock
;
Map
<
String
,
Object
>
carMap
=
new
HashMap
<>();
...
...
@@ -303,7 +297,6 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
"supplierId"
,
supplyId
==
null
?
""
:
supplyId
.
toString
(),
"subProcess"
,
chooseProcess
==
null
?
""
:
chooseProcess
.
getName
(),
"subProcessId"
,
chooseProcess
==
null
?
""
:
chooseProcess
.
getId
()
+
""
,
"inStockId"
,
chooseStock
==
null
?
""
:
chooseStock
.
getId
()
+
""
,
"customerId"
,
clientId
==
null
?
""
:
clientId
.
toString
(),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"deptId"
),
...
...
@@ -567,7 +560,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
for
(
ProcessBean
process
:
dataList
)
{
processNameList
.
add
(
process
.
getName
());
}
processDialog
=
DialogUtils
.
listDialog
(
this
);
processDialog
=
DialogUtils
.
listDialog
(
this
);
processDialog
.
addItems
(
processNameList
.
toArray
(
new
String
[
processNameList
.
size
()]),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
...
...
@@ -698,7 +691,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_add_cart_trading
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
AddAndReduce
Double
View
useNum
=
view
.
findViewById
(
R
.
id
.
ar_use_num
);
AddAndReduceView
useNum
=
view
.
findViewById
(
R
.
id
.
ar_use_num
);
useNum
.
setMaxNum
(
quantity
.
getQuantity
());
AddAndReduceView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
RecyclerView
rvProduct
=
view
.
findViewById
(
R
.
id
.
rv_pro
);
...
...
@@ -713,8 +706,8 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
double
number
=
useNum
.
getNumber
();
if
(
number
==
0
d
)
{
String
number
=
useNum
.
getNumber
();
if
(
Double
.
valueOf
(
number
)
==
0
d
)
{
toast
(
"请选择使用数量"
);
return
;
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleCarActivity.java
浏览文件 @
1b2ddf5c
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
store
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
...
...
@@ -12,6 +13,7 @@ import com.wd.workoffice.R;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.ui.adapter.StoreCarAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -59,7 +61,11 @@ public class StoreSaleCarActivity extends WorkToolBarActivity {
@Override
protected
void
initData
()
{
productList
=
new
ArrayList
<>();
productAdapter
=
new
StoreCarAdapter
(
R
.
layout
.
item_store_car
,
productList
);
if
(
TextUtils
.
equals
(
PermissionType
.
PROCESS_SUPPLY
.
getCode
(),
getIntent
().
getStringExtra
(
"code"
)))
{
productAdapter
=
new
StoreCarAdapter
(
R
.
layout
.
item_store_car
,
productList
,
2
);
}
else
{
productAdapter
=
new
StoreCarAdapter
(
R
.
layout
.
item_store_car
,
productList
);
}
productAdapter
.
bindToRecyclerView
(
rvProduct
);
String
pro
=
getIntent
().
getStringExtra
(
"pro"
);
productList
.
addAll
(
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
...
...
@@ -100,17 +106,17 @@ 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
()
+
""
,
2
),
2
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
2
),
2
);
}
if
(
productList
.
size
()
==
0
)
{
if
(
productList
.
size
()
==
0
)
{
toast
(
"购物车里没有产品哦"
);
return
;
}
startActivity
(
StoreSaleConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"subProcessId"
,
getIntent
().
getStringExtra
(
"subProcessId"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
),
...
...
@@ -138,7 +144,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
(),
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingCarActivity.java
浏览文件 @
1b2ddf5c
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.ProductBean
;
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
com.wd.workoffice.widget.AddAndReduce
Double
View
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
...
...
@@ -60,7 +54,7 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
@BindView
(
R
.
id
.
tv_apply_num
)
TextView
tvApplyNum
;
@BindView
(
R
.
id
.
ar_use_num
)
AddAndReduce
Double
View
arUseNum
;
AddAndReduceView
arUseNum
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
private
List
<
ProductBean
.
RecordsBean
>
productList
;
...
...
@@ -82,7 +76,7 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
tvApplyNum
.
setText
(
String
.
valueOf
(
pro
.
getQuantity
()));
tvDept
.
setText
(
pro
.
getDeptName
());
arUseNum
.
setMaxNum
(
pro
.
getQuantity
());
arUseNum
.
setNumber
(
Double
.
valueOf
(
pro
.
getChooseNum
()
));
arUseNum
.
setNumber
(
pro
.
getChooseNum
(
));
productList
=
new
ArrayList
<>();
productAdapter
=
new
TradingProCarAdapter
(
R
.
layout
.
item_trading_product_car
,
productList
);
productAdapter
.
bindToRecyclerView
(
rvProduct
);
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingProductActivity.java
浏览文件 @
1b2ddf5c
...
...
@@ -24,7 +24,6 @@ import com.wd.workoffice.retrofit.WorkObserver;
import
com.wd.workoffice.ui.adapter.TradingProDetailAdapter
;
import
com.wd.workoffice.ui.adapter.TradingProductAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -91,7 +90,7 @@ public class StoreTradingProductActivity extends WorkToolBarActivity {
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_add_cart_trading
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
AddAndReduce
Double
View
useNum
=
view
.
findViewById
(
R
.
id
.
ar_use_num
);
AddAndReduceView
useNum
=
view
.
findViewById
(
R
.
id
.
ar_use_num
);
useNum
.
setMaxNum
(
quantity
.
getQuantity
());
AddAndReduceView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
RecyclerView
rvProduct
=
view
.
findViewById
(
R
.
id
.
rv_pro
);
...
...
@@ -106,8 +105,8 @@ public class StoreTradingProductActivity extends WorkToolBarActivity {
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
double
number
=
useNum
.
getNumber
();
if
(
number
==
0
d
)
{
String
number
=
useNum
.
getNumber
();
if
(
Double
.
valueOf
(
number
)
==
0
d
)
{
toast
(
"请选择使用数量"
);
return
;
}
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
浏览文件 @
1b2ddf5c
...
...
@@ -43,9 +43,9 @@ public class AddCrucibleCarAdapter extends BaseQuickAdapter<ProductBean.RecordsB
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarDoubleNum
()
+
""
,
item
.
getInternalPrice
()
+
""
,
2
));
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduce
Double
View
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setMaxNum
(
item
.
getCanUseProductSum
());
num
.
setOnNumberChangedListener
(
new
AddAndReduce
Double
View
.
OnNumberChangedListener
()
{
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setCarDoubleNum
(
Double
.
valueOf
(
vs
));
...
...
@@ -77,7 +77,7 @@ public class AddCrucibleCarAdapter extends BaseQuickAdapter<ProductBean.RecordsB
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
num
.
setNumber
(
item
.
getCar
Double
Num
());
num
.
setNumber
(
item
.
getCarNum
());
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
浏览文件 @
1b2ddf5c
...
...
@@ -27,7 +27,7 @@ import flexible.xd.android_base.utils.ToastUtil;
*/
public
class
StoreCarAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
int
type
=
0
;
//1 确认订单页面 2 单数量无价格
int
type
=
0
;
//1 确认订单页面 2 单数量无价格
public
StoreCarAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
...
...
@@ -46,29 +46,29 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
String
.
valueOf
(
item
.
getInternalPrice
())));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
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
()
,
item
.
getInternalPrice
()
+
""
,
3
));
if
(
type
==
1
)
{
helper
.
addOnClickListener
(
R
.
id
.
rl_choose_dep
);
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
if
(!
TextUtils
.
isEmpty
(
item
.
getFactoryName
()))
{
helper
.
setText
(
R
.
id
.
tv_choose_dep
,
item
.
getFactoryName
());
}
if
(!
TextUtils
.
isEmpty
(
item
.
getUrl
())){
helper
.
setText
(
R
.
id
.
tv_upload
,
"已上传,点击替换"
);
if
(!
TextUtils
.
isEmpty
(
item
.
getUrl
()))
{
helper
.
setText
(
R
.
id
.
tv_upload
,
"已上传,点击替换"
);
}
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
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
.
getCarPrice
(),
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
,
String
.
valueOf
(
item
.
getInternalPrice
()),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
helper
.
setGone
(
R
.
id
.
ll_price
,
false
);
helper
.
setGone
(
R
.
id
.
ll_price
,
false
);
num
.
setNumber
(
item
.
getCarNum
());
}
else
{
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
...
...
@@ -77,7 +77,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
+
""
,
item
.
getCarPrice
(),
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
,
String
.
valueOf
(
item
.
getInternalPrice
()),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
...
...
@@ -101,7 +101,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
()
+
""
,
item
.
getCarPrice
(),
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
,
String
.
valueOf
(
item
.
getInternalPrice
()),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/WorkSendApplyAddAdapter.java
浏览文件 @
1b2ddf5c
...
...
@@ -13,6 +13,7 @@ import com.wd.workoffice.bean.OrderDetail;
import
com.wd.workoffice.bean.event.SendWeightEvent
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -49,9 +50,9 @@ public class WorkSendApplyAddAdapter extends BaseQuickAdapter<OrderDetail.OrderI
helper
.
setText
(
R
.
id
.
tv_num
,
String
.
valueOf
(
item
.
getProductCount
()));
helper
.
setText
(
R
.
id
.
tv_apply_send_num
,
String
.
valueOf
(
item
.
getStoreSum
()));
helper
.
setText
(
R
.
id
.
tv_send_num
,
"发货数量:"
+
String
.
valueOf
(
item
.
getUsedSum
()));
AddAndReduce
Double
View
nrcNum
=
helper
.
getView
(
R
.
id
.
arv_num
);
AddAndReduceView
nrcNum
=
helper
.
getView
(
R
.
id
.
arv_num
);
nrcNum
.
setMaxNum
(
item
.
getStoreSum
());
nrcNum
.
setOnNumberChangedListener
(
new
AddAndReduce
Double
View
.
OnNumberChangedListener
()
{
nrcNum
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setChooseNum
(
vs
);
...
...
app/src/main/java/com/wd/workoffice/widget/AddAndReduceView.java
浏览文件 @
1b2ddf5c
...
...
@@ -22,7 +22,7 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen
private
final
Button
add
;
private
final
Button
remove
;
private
final
EditText
tvNum
;
private
String
num
=
"
1
"
;
private
String
num
=
"
0
"
;
private
double
maxNum
=
10000
f
;
public
AddAndReduceView
(
Context
context
,
AttributeSet
attrs
)
{
...
...
app/src/main/res/layout/activity_treading_shopcar.xml
浏览文件 @
1b2ddf5c
...
...
@@ -189,7 +189,7 @@
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"16sp"
/>
<com.wd.workoffice.widget.AddAndReduce
Double
View
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_use_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/item_add_crucible_double.xml
浏览文件 @
1b2ddf5c
...
...
@@ -202,7 +202,7 @@
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduce
Double
View
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_num"
android:layout_width=
"150mm"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/item_send_apply_add.xml
浏览文件 @
1b2ddf5c
...
...
@@ -216,11 +216,11 @@
android:layout_height=
"wrap_content"
android:text=
"本次发货数"
/>
<com.wd.workoffice.widget.AddAndReduce
Double
View
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/arv_num"
android:layout_width=
"1
0
0mm"
android:layout_width=
"1
3
0mm"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5mm"
android:layout_gravity=
"right"
></com.wd.workoffice.widget.AddAndReduceDoubleView
>
android:layout_gravity=
"right"
/
>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/view_add_cart_trading.xml
浏览文件 @
1b2ddf5c
...
...
@@ -32,7 +32,7 @@
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduce
Double
View
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_use_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/view_add_remove.xml
浏览文件 @
1b2ddf5c
...
...
@@ -23,7 +23,7 @@
android:background=
"@null"
android:inputType=
"numberDecimal"
android:gravity=
"center"
android:text=
"
1
"
android:text=
"
0
"
android:textColor=
"#5C7589"
android:textSize=
"17sp"
/>
...
...
app/src/main/res/layout/view_choose_pro_from.xml
浏览文件 @
1b2ddf5c
...
...
@@ -64,7 +64,7 @@
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduce
Double
View
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论