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
e10c8eb3
提交
e10c8eb3
authored
6月 21, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改内部交易
上级
504525cc
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
469 行增加
和
356 行删除
+469
-356
TradingBean.java
app/src/main/java/com/wd/workoffice/bean/TradingBean.java
+18
-0
BatChooseInfoContract.java
...ava/com/wd/workoffice/contract/BatChooseInfoContract.java
+2
-2
BatChooseInfoPresenter.java
...a/com/wd/workoffice/presenter/BatChooseInfoPresenter.java
+3
-4
ChooseInfoActivity.java
.../workoffice/ui/activity/bat/store/ChooseInfoActivity.java
+37
-22
StoreTradingCarActivity.java
...office/ui/activity/bat/store/StoreTradingCarActivity.java
+10
-43
StoreTradingConfirmActivity.java
...ce/ui/activity/bat/store/StoreTradingConfirmActivity.java
+23
-31
StoreTradingProductActivity.java
...ce/ui/activity/bat/store/StoreTradingProductActivity.java
+7
-7
TradingConfimProAdapter.java
...com/wd/workoffice/ui/adapter/TradingConfimProAdapter.java
+13
-6
TradingProCarAdapter.java
...va/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
+27
-17
TradingProDetailAdapter.java
...com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
+32
-16
TradingProductAdapter.java
...a/com/wd/workoffice/ui/adapter/TradingProductAdapter.java
+10
-0
activity_trading_confirm.xml
app/src/main/res/layout/activity_trading_confirm.xml
+0
-61
activity_treading_shopcar.xml
app/src/main/res/layout/activity_treading_shopcar.xml
+0
-139
item_trading_confirm_pro.xml
app/src/main/res/layout/item_trading_confirm_pro.xml
+59
-0
item_trading_product.xml
app/src/main/res/layout/item_trading_product.xml
+54
-7
item_trading_product_car.xml
app/src/main/res/layout/item_trading_product_car.xml
+146
-0
view_add_cart_trading.xml
app/src/main/res/layout/view_add_cart_trading.xml
+28
-1
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/TradingBean.java
浏览文件 @
e10c8eb3
...
...
@@ -135,6 +135,24 @@ public class TradingBean {
private
Object
quantityDetailList
;
private
Object
quantityFlowList
;
private
String
chooseNum
;
private
String
chooseName
;
private
ProductBean
.
RecordsBean
changePro
;
public
ProductBean
.
RecordsBean
getChangePro
()
{
return
changePro
;
}
public
void
setChangePro
(
ProductBean
.
RecordsBean
changePro
)
{
this
.
changePro
=
changePro
;
}
public
String
getChooseName
()
{
return
chooseName
;
}
public
void
setChooseName
(
String
chooseName
)
{
this
.
chooseName
=
chooseName
;
}
public
String
getChooseNum
()
{
return
chooseNum
;
...
...
app/src/main/java/com/wd/workoffice/contract/BatChooseInfoContract.java
浏览文件 @
e10c8eb3
...
...
@@ -41,7 +41,7 @@ public interface BatChooseInfoContract {
void
getStock
(
List
<
StockBean
>
dataList
);
void
getTradingPro
(
TradingBean
.
RecordsBean
code
,
List
<
ProductBean
.
RecordsBean
>
dataList
);
void
getTradingPro
(
List
<
ProductBean
.
RecordsBean
>
dataList
);
void
getTradingProList
(
List
<
TradingBean
.
RecordsBean
>
dataList
);
}
...
...
@@ -55,7 +55,7 @@ public interface BatChooseInfoContract {
void
getStock
(
Map
<
String
,
Object
>
param
);
void
getTradingPro
(
TradingBean
.
RecordsBean
code
);
void
getTradingPro
(
String
code
);
void
getTradingProList
(
Map
<
String
,
Object
>
param
);
}
...
...
app/src/main/java/com/wd/workoffice/presenter/BatChooseInfoPresenter.java
浏览文件 @
e10c8eb3
...
...
@@ -114,9 +114,9 @@ public class BatChooseInfoPresenter extends BasePresenter<BatChooseInfoContract.
}
@Override
public
void
getTradingPro
(
TradingBean
.
RecordsBean
code
)
{
public
void
getTradingPro
(
String
code
)
{
mView
.
showLoading
();
mModel
.
getTradingPro
(
code
.
getProductSoleCode
()
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
mModel
.
getTradingPro
(
code
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
mDisposable
.
add
(
d
);
...
...
@@ -135,8 +135,7 @@ public class BatChooseInfoPresenter extends BasePresenter<BatChooseInfoContract.
mView
.
onError
(
data
.
getMessage
());
return
;
}
List
<
ProductBean
.
RecordsBean
>
productBean
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
ProductBean
.
RecordsBean
.
class
);
mView
.
getTradingPro
(
code
,
JSON
.
parseArray
(
data
.
getData
().
toString
(),
ProductBean
.
RecordsBean
.
class
));
mView
.
getTradingPro
(
JSON
.
parseArray
(
data
.
getData
().
toString
(),
ProductBean
.
RecordsBean
.
class
));
}
});
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/ChooseInfoActivity.java
浏览文件 @
e10c8eb3
...
...
@@ -4,6 +4,7 @@ import android.content.DialogInterface;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.ArrayMap
;
import
android.view.LayoutInflater
;
import
android.view.Menu
;
import
android.view.MenuItem
;
...
...
@@ -113,12 +114,15 @@ 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
;
private
StockBean
chooseSendStock
;
private
BadgeCarProvider
mActionProvider
;
private
TradingProDetailAdapter
tradingProDetailAdapter
;
private
List
<
ProductBean
.
RecordsBean
>
changeProList
;
private
List
<
TradingBean
.
RecordsBean
>
tradingCarList
=
new
ArrayList
<>();
@Override
protected
void
initView
()
{
...
...
@@ -218,7 +222,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
if
(
TextUtils
.
equals
(
"6"
,
type
))
{
batChooseInfoPresenter
.
getTradingPro
(
tradingProductList
.
get
(
position
));
openDialogInside
(
tradingProductList
.
get
(
position
));
}
else
{
openDialog
(
proList
.
get
(
position
));
}
...
...
@@ -228,7 +232,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
tradingProductAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
batChooseInfoPresenter
.
getTradingPro
(
tradingProductList
.
get
(
position
));
openDialogInside
(
tradingProductList
.
get
(
position
));
}
});
}
...
...
@@ -264,12 +268,12 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
toast
(
"请选择入库仓库"
);
return
true
;
}
if
(
!
carMap
.
containsKey
(
"pro"
)
)
{
if
(
tradingCarList
.
size
()==
0
)
{
toast
(
"购物车没有产品"
);
return
true
;
}
startActivity
(
StoreTradingCarActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
carMap
),
"pro"
,
JSON
.
toJSONString
(
tradingCarList
),
"supplierId"
,
supplyId
==
null
?
""
:
supplyId
.
toString
(),
"subProcess"
,
chooseProcess
==
null
?
""
:
chooseProcess
.
getName
(),
"subProcessId"
,
chooseProcess
==
null
?
""
:
chooseProcess
.
getId
()
+
""
,
...
...
@@ -625,8 +629,11 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
}
@Override
public
void
getTradingPro
(
TradingBean
.
RecordsBean
data
,
List
<
ProductBean
.
RecordsBean
>
list
)
{
openDialogInside
(
data
,
list
);
public
void
getTradingPro
(
List
<
ProductBean
.
RecordsBean
>
list
)
{
toast
(
"搜索完成"
);
changeProList
.
clear
();
changeProList
.
addAll
(
list
);
tradingProDetailAdapter
.
notifyDataSetChanged
();
}
@Override
...
...
@@ -788,25 +795,35 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
* 内部交易选择产品
*
* @param quantity
* @param data
*/
private
void
openDialogInside
(
TradingBean
.
RecordsBean
quantity
,
List
<
ProductBean
.
RecordsBean
>
data
)
{
private
void
openDialogInside
(
TradingBean
.
RecordsBean
quantity
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
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
);
TextView
tvSearch
=
view
.
findViewById
(
R
.
id
.
iv_search
);
EditText
tvKey
=
view
.
findViewById
(
R
.
id
.
et_key
);
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
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
List
<
ProductBean
.
RecordsBean
>
dataList
=
new
ArrayList
<>();
dataList
.
addAll
(
data
);
TradingProDetailAdapter
tradingProDetailAdapter
=
new
TradingProDetailAdapter
(
R
.
layout
.
item_trading_product_dialog
,
dataList
);
changeProList
=
new
ArrayList
<>();
tradingProDetailAdapter
=
new
TradingProDetailAdapter
(
R
.
layout
.
item_trading_product_dialog
,
changeProList
);
tradingProDetailAdapter
.
bindToRecyclerView
(
rvProduct
);
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvSearch
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
tvKey
.
getText
().
toString
())){
toast
(
"请输入搜索关键字"
);
return
;
}
batChooseInfoPresenter
.
getTradingPro
(
tvKey
.
getText
().
toString
());
}
});
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
@@ -815,18 +832,12 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
toast
(
"请选择使用数量"
);
return
;
}
Map
<
Integer
,
Boolean
>
isChoose
=
tradingProDetailAdapter
.
getIsChoose
();
List
<
ProductBean
.
RecordsBean
>
info
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Integer
,
Boolean
>
entry
:
isChoose
.
entrySet
())
{
if
(
entry
.
getValue
())
{
ProductBean
.
RecordsBean
recordsBean
=
dataList
.
get
(
entry
.
getKey
());
info
.
add
(
recordsBean
);
}
}
if
(
info
.
size
()
==
0
)
{
if
(
tradingProDetailAdapter
.
getChoosePos
()
==
-
1
)
{
toast
(
"请选择置换产品"
);
return
;
}
info
.
add
(
changeProList
.
get
(
tradingProDetailAdapter
.
getChoosePos
()));
quantity
.
setChooseNum
(
String
.
valueOf
(
useNum
.
getNumber
()));
addCartInside
(
quantity
,
info
,
num
.
getNumber
());
addCartDialog
.
dismiss
();
...
...
@@ -845,14 +856,18 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
for
(
ProductBean
.
RecordsBean
bean
:
data
)
{
bean
.
setCarNum
(
number
);
}
carMap
.
put
(
"pro"
,
JSON
.
toJSONString
(
quantity
));
carMap
.
put
(
"proDetail"
,
JSON
.
toJSONString
(
data
));
quantity
.
setChangePro
(
data
.
get
(
0
));
quantity
.
setChooseName
(
data
.
get
(
0
).
getName
());
tradingCarList
.
add
(
quantity
);
// carMap.put("pro", JSON.toJSONString(quantity));
// carMap.put("proDetail", JSON.toJSONString(data));
if
(
data
.
size
()
>
0
)
{
mActionProvider
.
setBadgeVisibility
(
View
.
VISIBLE
);
}
else
{
mActionProvider
.
setBadgeVisibility
(
View
.
GONE
);
}
toast
(
"加入购物车成功"
);
tradingProductAdapter
.
notifyDataSetChanged
();
}
private
void
changeCarBadge
()
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingCarActivity.java
浏览文件 @
e10c8eb3
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
store
;
import
android.os.Bundle
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
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.MathUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
...
...
@@ -19,7 +18,6 @@ import org.greenrobot.eventbus.ThreadMode;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
...
...
@@ -34,7 +32,6 @@ import butterknife.OnClick;
* github: https://github.com/FlexibleXd
**/
public
class
StoreTradingCarActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_price
)
...
...
@@ -43,24 +40,10 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
TextView
tvOk
;
@BindView
(
R
.
id
.
ll_bottom
)
RelativeLayout
llBottom
;
@BindView
(
R
.
id
.
tv_name
)
TextView
tvName
;
@BindView
(
R
.
id
.
tv_card
)
TextView
tvCard
;
@BindView
(
R
.
id
.
tv_card_name
)
TextView
tvCardName
;
@BindView
(
R
.
id
.
tv_dept
)
TextView
tvDept
;
@BindView
(
R
.
id
.
tv_apply_num
)
TextView
tvApplyNum
;
@BindView
(
R
.
id
.
ar_use_num
)
AddAndReduceView
arUseNum
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
private
List
<
Product
Bean
.
RecordsBean
>
productList
;
private
List
<
Trading
Bean
.
RecordsBean
>
productList
;
private
TradingProCarAdapter
productAdapter
;
private
Map
data
;
private
TradingBean
.
RecordsBean
pro
;
@Override
protected
void
initView
()
{
...
...
@@ -70,31 +53,17 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
@Override
protected
void
initData
()
{
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"pro"
),
Map
.
class
);
pro
=
JSON
.
parseObject
(
data
.
get
(
"pro"
).
toString
(),
TradingBean
.
RecordsBean
.
class
);
tvName
.
setText
(
pro
.
getProductName
());
tvCard
.
setText
(
pro
.
getProductSimpleCode
());
tvCardName
.
setText
(
pro
.
getProductSoleCode
());
tvApplyNum
.
setText
(
MathUtils
.
converData
(
pro
.
getQuantity
(),
3
));
tvDept
.
setText
(
pro
.
getDeptName
());
arUseNum
.
setMaxNum
(
pro
.
getQuantity
());
arUseNum
.
setNumber
(
pro
.
getChooseNum
());
productList
=
new
ArrayList
<>();
productAdapter
=
new
TradingProCarAdapter
(
R
.
layout
.
item_trading_product_car
,
productList
);
productAdapter
.
bindToRecyclerView
(
rvProduct
);
productList
.
addAll
(
JSON
.
parseArray
(
data
.
get
(
"proDetail"
).
toString
(),
Product
Bean
.
RecordsBean
.
class
));
productList
.
addAll
(
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"pro"
),
Trading
Bean
.
RecordsBean
.
class
));
productAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
}
@Override
protected
void
initEvent
()
{
arUseNum
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
pro
.
setChooseNum
(
vs
);
}
});
// productAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
// @Override
// public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
...
...
@@ -125,13 +94,11 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
@OnClick
(
R
.
id
.
tv_ok
)
public
void
onViewClicked
()
{
String
allPrice
=
""
;
for
(
Product
Bean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
,
MathUtils
.
converData
(
recordsBean
.
get
InternalPrice
(),
3
),
3
),
3
);
for
(
Trading
Bean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getC
hangePro
().
getC
arNum
()
,
MathUtils
.
converData
(
recordsBean
.
get
ChangePro
().
getInternalPrice
(),
3
),
3
),
3
);
}
data
.
put
(
"proDetail"
,
productList
);
data
.
put
(
"pro"
,
pro
);
startActivity
(
StoreTradingConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
data
),
startActivity
(
StoreTradingConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
...
...
@@ -161,8 +128,8 @@ public class StoreTradingCarActivity extends WorkToolBarActivity {
private
void
changeNumAndPrice
()
{
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
Product
Bean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getC
arNum
(),
recordsBean
.
getInternalPrice
()
+
""
,
3
),
for
(
Trading
Bean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getC
hangePro
().
getCarNum
(),
recordsBean
.
getChangePro
()
.
getInternalPrice
()
+
""
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingConfirmActivity.java
浏览文件 @
e10c8eb3
...
...
@@ -5,14 +5,11 @@ import android.content.DialogInterface;
import
android.content.Intent
;
import
android.content.pm.ActivityInfo
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -24,7 +21,6 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.TradingBean
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.retrofit.ApiService
;
...
...
@@ -57,9 +53,7 @@ import butterknife.ButterKnife;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.RtfHelper
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
flexible.xd.android_base.utils.LogUtils
;
import
flexible.xd.android_base.utils.TimeUtils
;
import
flexible.xd.android_base.utils.constant.TimeConstants
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
import
okhttp3.MediaType
;
...
...
@@ -73,7 +67,6 @@ import okhttp3.RequestBody;
* github: https://github.com/FlexibleXd
**/
public
class
StoreTradingConfirmActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_price
)
...
...
@@ -114,11 +107,7 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
EditText
etInput5
;
@BindView
(
R
.
id
.
tv_input5
)
TextView
tvInput5
;
@BindView
(
R
.
id
.
tv_card
)
TextView
tvCard
;
@BindView
(
R
.
id
.
tv_use_num
)
TextView
tvUseNum
;
private
List
<
ProductBean
.
RecordsBean
>
proList
;
private
List
<
TradingBean
.
RecordsBean
>
proList
;
private
TradingConfimProAdapter
proAdapter
;
private
QMUIDialog
.
MenuDialogBuilder
setDialog
;
private
String
[]
setArray
=
new
String
[]{
"钢控"
,
"锆碳"
};
...
...
@@ -150,14 +139,10 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
@Override
protected
void
initData
()
{
Map
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"pro"
),
Map
.
class
);
pro
=
JSON
.
parseObject
(
data
.
get
(
"pro"
).
toString
(),
TradingBean
.
RecordsBean
.
class
);
tvCard
.
setText
(
pro
.
getProductName
());
tvUseNum
.
setText
(
pro
.
getChooseNum
());
proList
=
new
ArrayList
<>();
proAdapter
=
new
TradingConfimProAdapter
(
R
.
layout
.
item_trading_confirm_pro
,
proList
);
proAdapter
.
bindToRecyclerView
(
rvPro
);
proList
.
addAll
(
JSON
.
parseArray
(
data
.
get
(
"proDetail"
).
toString
(),
Product
Bean
.
RecordsBean
.
class
));
proList
.
addAll
(
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"pro"
),
Trading
Bean
.
RecordsBean
.
class
));
proAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
param
=
new
HashMap
<>();
...
...
@@ -188,17 +173,17 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
* @param proList
* @return
*/
private
List
<
JSONObject
>
coverProInfo
(
List
<
Product
Bean
.
RecordsBean
>
proList
)
{
private
List
<
JSONObject
>
coverProInfo
(
List
<
Trading
Bean
.
RecordsBean
>
proList
)
{
List
<
JSONObject
>
orderItems
=
new
ArrayList
<>();
for
(
Product
Bean
.
RecordsBean
recordsBean
:
proList
)
{
for
(
Trading
Bean
.
RecordsBean
recordsBean
:
proList
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
"productId"
,
recordsBean
.
getId
());
data
.
put
(
"productCount"
,
recordsBean
.
getCarNum
());
data
.
put
(
"productId"
,
recordsBean
.
get
ChangePro
().
get
Id
());
data
.
put
(
"productCount"
,
recordsBean
.
getC
hangePro
().
getC
arNum
());
data
.
put
(
"type"
,
"PDS"
);
data
.
put
(
"sourceProductId"
,
pro
.
getProductId
());
data
.
put
(
"sourceProductCount"
,
pro
.
getChooseNum
());
data
.
put
(
"stockId"
,
pro
.
getStockId
());
data
.
put
(
"annex"
,
recordsBean
.
getUrl
());
data
.
put
(
"sourceProductId"
,
recordsBean
.
getProductId
());
data
.
put
(
"sourceProductCount"
,
recordsBean
.
getChooseNum
());
data
.
put
(
"stockId"
,
recordsBean
.
getStockId
());
data
.
put
(
"annex"
,
recordsBean
.
get
ChangePro
().
get
Url
());
orderItems
.
add
(
data
);
}
return
orderItems
;
...
...
@@ -232,7 +217,7 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
* @param tv
*/
private
void
addNumListener
(
EditText
et
,
TextView
tv
)
{
WorkUtils
.
addNumListener
(
et
,
tv
);
WorkUtils
.
addNumListener
(
et
,
tv
);
}
@Override
...
...
@@ -350,8 +335,8 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
private
void
changeNumAndPrice
()
{
tvNum
.
setText
(
"共 "
.
concat
(
proList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
Product
Bean
.
RecordsBean
recordsBean
:
proList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getC
arNum
()
,
MathUtils
.
converData
(
recordsBean
.
getInternalPrice
(),
3
),
3
),
3
);
for
(
Trading
Bean
.
RecordsBean
recordsBean
:
proList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getC
hangePro
().
getCarNum
(),
MathUtils
.
converData
(
recordsBean
.
getChangePro
().
getInternalPrice
(),
3
),
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
...
...
@@ -363,8 +348,8 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
Integer
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
String
name
=
data
.
getStringExtra
(
"name"
);
Integer
position
=
Integer
.
valueOf
(
data
.
getStringExtra
(
"position"
));
proList
.
get
(
position
).
setFactoryId
(
clientId
);
proList
.
get
(
position
).
setFactoryName
(
name
);
proList
.
get
(
position
).
getChangePro
().
setFactoryId
(
clientId
);
proList
.
get
(
position
).
getChangePro
().
setFactoryName
(
name
);
proAdapter
.
notifyItemChanged
(
position
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
RESULT_OK
)
{
if
(
Matisse
.
obtainResult
(
data
).
size
()
!=
0
)
{
...
...
@@ -393,7 +378,7 @@ public class StoreTradingConfirmActivity extends WorkToolBarActivity {
return
;
}
toast
(
"上传成功"
);
proList
.
get
(
choosePosition
).
setUrl
(
jsonObject
.
getString
(
"data"
));
proList
.
get
(
choosePosition
).
getChangePro
().
setUrl
(
jsonObject
.
getString
(
"data"
));
coverProInfo
(
proList
);
proAdapter
.
notifyDataSetChanged
();
}
...
...
@@ -428,4 +413,11 @@ public class StoreTradingConfirmActivity 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/store/StoreTradingProductActivity.java
浏览文件 @
e10c8eb3
...
...
@@ -110,14 +110,14 @@ public class StoreTradingProductActivity extends WorkToolBarActivity {
toast
(
"请选择使用数量"
);
return
;
}
Map
<
Integer
,
Boolean
>
isChoose
=
tradingProDetailAdapter
.
getIsChoose
();
//
Map<Integer, Boolean> isChoose = tradingProDetailAdapter.getIsChoose();
List
<
ProductBean
.
RecordsBean
>
info
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Integer
,
Boolean
>
entry
:
isChoose
.
entrySet
())
{
if
(
entry
.
getValue
())
{
ProductBean
.
RecordsBean
recordsBean
=
dataList
.
get
(
entry
.
getKey
());
info
.
add
(
recordsBean
);
}
}
//
for (Map.Entry<Integer, Boolean> entry : isChoose.entrySet()) {
//
if (entry.getValue()) {
//
ProductBean.RecordsBean recordsBean = dataList.get(entry.getKey());
//
info.add(recordsBean);
//
}
//
}
if
(
info
.
size
()
==
0
)
{
toast
(
"请选择置换产品"
);
return
;
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingConfimProAdapter.java
浏览文件 @
e10c8eb3
...
...
@@ -11,6 +11,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.bean.TradingBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
...
...
@@ -25,7 +26,7 @@ import flexible.xd.android_base.utils.ToastUtil;
* Created by flexible on 2018/8/13.
*/
public
class
TradingConfimProAdapter
extends
BaseQuickAdapter
<
Product
Bean
.
RecordsBean
,
BaseViewHolder
>
{
public
class
TradingConfimProAdapter
extends
BaseQuickAdapter
<
Trading
Bean
.
RecordsBean
,
BaseViewHolder
>
{
public
TradingConfimProAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
...
...
@@ -33,12 +34,18 @@ public class TradingConfimProAdapter extends BaseQuickAdapter<ProductBean.Record
@Override
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
()
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
),
3
));
protected
void
convert
(
BaseViewHolder
helper
,
TradingBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getProductName
());
helper
.
setText
(
R
.
id
.
tv_use_num
,
MathUtils
.
converData
(
item
.
getChooseNum
(),
3
));
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getChangePro
().
getName
());
helper
.
setText
(
R
.
id
.
tv_num
,
MathUtils
.
converData
(
item
.
getChangePro
().
getCarNum
(),
3
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getChangePro
().
getCarNum
()
,
MathUtils
.
converData
(
item
.
getChangePro
().
getInternalPrice
(),
3
),
3
));
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
if
(!
TextUtils
.
isEmpty
(
item
.
getUrl
())){
if
(!
TextUtils
.
isEmpty
(
item
.
get
ChangePro
().
get
Url
())){
helper
.
setText
(
R
.
id
.
tv_upload
,
"已上传,点击替换"
);
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
浏览文件 @
e10c8eb3
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.
Product
Bean
;
import
com.wd.workoffice.bean.
Trading
Bean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
TradingProCarAdapter
extends
BaseQuickAdapter
<
Product
Bean
.
RecordsBean
,
BaseViewHolder
>
{
public
class
TradingProCarAdapter
extends
BaseQuickAdapter
<
Trading
Bean
.
RecordsBean
,
BaseViewHolder
>
{
public
TradingProCarAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
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
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
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
));
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
.
getProductSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_top_card_name
,
item
.
getProductSoleCode
());
helper
.
setText
(
R
.
id
.
tv_apply_num
,
MathUtils
.
converData
(
item
.
getQuantity
(),
3
));
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
getDeptName
());
AddAndReduceView
userNum
=
helper
.
getView
(
R
.
id
.
ar_use_num
);
userNum
.
setNumber
(
item
.
getChooseNum
());
userNum
.
setMaxNum
(
item
.
getQuantity
());
userNum
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setChooseNum
(
vs
);
}
});
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
().
getSoleCode
());
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
));
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setNumber
(
item
.
getCarNum
());
num
.
setNumber
(
item
.
getC
hangePro
().
getC
arNum
());
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
vs
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
),
3
));
item
.
getChangePro
().
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
vs
,
MathUtils
.
converData
(
item
.
get
ChangePro
().
get
InternalPrice
(),
3
),
3
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
浏览文件 @
e10c8eb3
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.view.View
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
...
...
@@ -21,38 +22,53 @@ import java.util.Map;
public
class
TradingProDetailAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
Map
<
Integer
,
Boolean
>
isChoose
=
new
HashMap
<>();
int
choosePos
=
-
1
;
public
TradingProDetailAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
for
(
int
i
=
0
;
i
<
isChoose
.
entrySet
().
size
();
i
++)
{
isChoose
.
put
(
i
,
false
);
}
}
@Override
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_name
,
item
.
getName
()
);
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
,
MathUtils
.
converData
(
item
.
getInternalPrice
(),
3
));
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
);
cbChoose
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
if
(
helper
.
getAdapterPosition
()
==
choosePos
)
{
cbChoose
.
setChecked
(
true
);
}
else
{
cbChoose
.
setChecked
(
false
);
}
cbChoose
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
isChoose
.
put
(
helper
.
getAdapterPosition
(),
cbChoose
.
isChecked
());
public
void
onClick
(
View
v
)
{
if
(
choosePos
==
helper
.
getAdapterPosition
()){
}
else
{
choosePos
=
helper
.
getAdapterPosition
();
notifyDataSetChanged
();
}
}
});
// cbChoose.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
// @Override
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// notifyItemChanged(choosePos);
// choosePos = helper.getAdapterPosition();
//// cbChoose.setChecked(isChecked);
// }
// });
}
public
Map
<
Integer
,
Boolean
>
getIsChoose
()
{
return
isChoose
;
public
int
getChoosePos
()
{
return
choosePos
;
}
public
void
set
IsChoose
(
Map
<
Integer
,
Boolean
>
isChoose
)
{
this
.
isChoose
=
isChoose
;
public
void
set
ChoosePos
(
int
choosePos
)
{
this
.
choosePos
=
choosePos
;
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProductAdapter.java
浏览文件 @
e10c8eb3
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.text.TextUtils
;
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.bean.TradingBean
;
import
com.wd.workoffice.util.MathUtils
;
import
java.util.List
;
...
...
@@ -26,6 +29,13 @@ public class TradingProductAdapter extends BaseQuickAdapter<TradingBean.RecordsB
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getProductSoleCode
());
helper
.
setText
(
R
.
id
.
tv_num
,
String
.
valueOf
(
item
.
getQuantity
()));
helper
.
setText
(
R
.
id
.
tv_dept
,
item
.
getDeptName
());
if
(!
TextUtils
.
isEmpty
(
item
.
getChooseNum
()))
{
helper
.
setVisible
(
R
.
id
.
ll_car
,
true
);
helper
.
setText
(
R
.
id
.
tv_pro
,
item
.
getChooseName
());
helper
.
setText
(
R
.
id
.
tv_car_num
,
MathUtils
.
converData
(
item
.
getChooseNum
(),
3
));
}
else
{
helper
.
setVisible
(
R
.
id
.
ll_car
,
false
);
}
helper
.
addOnClickListener
(
R
.
id
.
tv_cart
);
}
}
...
...
app/src/main/res/layout/activity_trading_confirm.xml
浏览文件 @
e10c8eb3
...
...
@@ -79,67 +79,6 @@
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"使用数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_use_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
</LinearLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"center"
android:text=
"置换产品信息"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_pro"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/activity_treading_shopcar.xml
浏览文件 @
e10c8eb3
...
...
@@ -59,145 +59,6 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"图号TH82739857"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:padding=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"图号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"来源仓库"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_dept"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"可申请数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_apply_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"使用数量"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"16sp"
/>
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_use_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_product"
...
...
app/src/main/res/layout/item_trading_confirm_pro.xml
浏览文件 @
e10c8eb3
...
...
@@ -7,7 +7,66 @@
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"使用数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_use_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
</LinearLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"center"
android:text=
"置换产品信息"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<LinearLayout
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/item_trading_product.xml
浏览文件 @
e10c8eb3
...
...
@@ -116,11 +116,57 @@
</LinearLayout>
<TextView
android:id=
"@+id/tv_cart"
android:layout_width=
"90mm"
android:layout_height=
"26mm"
android:layout_gravity=
"right"
android:layout_marginTop=
"10mm"
android:background=
"@mipmap/product_add_cart"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
>
<LinearLayout
android:id=
"@+id/ll_car"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:visibility=
"invisible"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"使用数量:"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_car_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxWidth=
"100mm"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"13sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15mm"
android:text=
"置换产品:"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_pro"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxWidth=
"100mm"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"12sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_cart"
android:layout_width=
"90mm"
android:layout_height=
"26mm"
android:layout_gravity=
"right"
android:background=
"@mipmap/product_add_cart"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_trading_product_car.xml
浏览文件 @
e10c8eb3
...
...
@@ -4,9 +4,155 @@
android:layout_height=
"wrap_content"
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"
android:background=
"@color/white"
android:orientation=
"vertical"
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"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:padding=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_top_card"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"图号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_top_card_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"来源仓库"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_dept"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"可申请数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_apply_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"使用数量"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"16sp"
/>
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_use_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"置换产品信息"
android:layout_marginTop=
"10mm"
android:textColor=
"@color/black"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/view_add_cart_trading.xml
浏览文件 @
e10c8eb3
...
...
@@ -48,11 +48,38 @@
android:text=
"选择置换产品"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"10mm"
android:gravity=
"center"
android:paddingVertical=
"5mm"
>
<EditText
android:id=
"@+id/et_key"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:paddingVertical=
"5mm"
android:paddingHorizontal=
"3mm"
android:hint=
"搜索置换产品"
android:textSize=
"14sp"
android:background=
"@drawable/shape_client_search"
/>
<TextView
android:id=
"@+id/iv_search"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:paddingHorizontal=
"8mm"
android:text=
"搜索"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_pro"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
200mm
"
android:layout_marginTop=
"5mm"
/>
<LinearLayout
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论