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
1fe1c23c
提交
1fe1c23c
authored
4月 08, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.下单
2.//TODO erp用户激活测试,忘记/重置密码测试,坩埚下单页面,往来(客户两个库),产品下单还差附件,mes,消息,刷新token
上级
b1225e47
显示空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
2974 行增加
和
17 行删除
+2974
-17
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+25
-0
ProductBean.java
app/src/main/java/com/wd/workoffice/bean/ProductBean.java
+9
-0
TradingBean.java
app/src/main/java/com/wd/workoffice/bean/TradingBean.java
+339
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+18
-0
StoreOutsourcingActivity.java
...ffice/ui/activity/bat/store/StoreOutsourcingActivity.java
+5
-4
StoreSaleCarActivity.java
...orkoffice/ui/activity/bat/store/StoreSaleCarActivity.java
+1
-0
StoreSaleConfirmActivity.java
...ffice/ui/activity/bat/store/StoreSaleConfirmActivity.java
+9
-9
StoreSaleProductActivity.java
...ffice/ui/activity/bat/store/StoreSaleProductActivity.java
+2
-0
StoreTradingActivity.java
...orkoffice/ui/activity/bat/store/StoreTradingActivity.java
+2
-1
StoreTradingCarActivity.java
...office/ui/activity/bat/store/StoreTradingCarActivity.java
+165
-0
StoreTradingConfirmActivity.java
...ce/ui/activity/bat/store/StoreTradingConfirmActivity.java
+445
-0
StoreTradingProductActivity.java
...ce/ui/activity/bat/store/StoreTradingProductActivity.java
+315
-0
StoreCarAdapter.java
...in/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
+1
-1
TradingConfimProAdapter.java
...com/wd/workoffice/ui/adapter/TradingConfimProAdapter.java
+43
-0
TradingProCarAdapter.java
...va/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
+53
-0
TradingProDetailAdapter.java
...com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
+57
-0
TradingProductAdapter.java
...a/com/wd/workoffice/ui/adapter/TradingProductAdapter.java
+32
-0
DialogUtils.java
app/src/main/java/com/wd/workoffice/util/DialogUtils.java
+0
-2
AddAndReduceDoubleView.java
...java/com/wd/workoffice/widget/AddAndReduceDoubleView.java
+95
-0
activity_trading_confirm.xml
app/src/main/res/layout/activity_trading_confirm.xml
+480
-0
activity_treading_shopcar.xml
app/src/main/res/layout/activity_treading_shopcar.xml
+213
-0
item_trading_confirm_pro.xml
app/src/main/res/layout/item_trading_confirm_pro.xml
+126
-0
item_trading_product.xml
app/src/main/res/layout/item_trading_product.xml
+127
-0
item_trading_product_car.xml
app/src/main/res/layout/item_trading_product_car.xml
+162
-0
item_trading_product_dialog.xml
app/src/main/res/layout/item_trading_product_dialog.xml
+133
-0
view_add_cart_trading.xml
app/src/main/res/layout/view_add_cart_trading.xml
+117
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
1fe1c23c
...
@@ -792,6 +792,31 @@
...
@@ -792,6 +792,31 @@
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.store.StoreTradingProductActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"选择产品"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.store.StoreTradingCarActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"购物车"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.store.StoreTradingConfirmActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"购物车"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
<provider
android:name=
"androidx.core.content.FileProvider"
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/bean/ProductBean.java
浏览文件 @
1fe1c23c
...
@@ -171,6 +171,15 @@ public class ProductBean {
...
@@ -171,6 +171,15 @@ public class ProductBean {
private
int
factoryId
;
private
int
factoryId
;
private
String
factoryName
;
private
String
factoryName
;
private
String
url
;
private
String
url
;
private
String
chooseNum
;
public
String
getChooseNum
()
{
return
chooseNum
;
}
public
void
setChooseNum
(
String
chooseNum
)
{
this
.
chooseNum
=
chooseNum
;
}
public
String
getUrl
()
{
public
String
getUrl
()
{
return
url
;
return
url
;
...
...
app/src/main/java/com/wd/workoffice/bean/TradingBean.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
bean
;
import
java.util.List
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
TradingBean
{
/**
* records : [{"createdBy":677,"createdByName":null,"createdTime":"2020-02-25 10:45:21","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":104,"productId":32,"stockId":27,"quantity":8,"lockQuantity":0,"version":5,"stockName":"销售一退货库","stockSign":null,"productName":"浸入式水口(方坯)","productSoleCode":"70LTJ568-1001","productSimpleCode":"J568-1","productSpec":"90","productUnit":"支","productWeight":0,"deptId":120,"deptName":"销售一公司","quantityDetailList":null,"quantityFlowList":null},{"createdBy":694,"createdByName":null,"createdTime":"2020-02-26 15:05:33","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":107,"productId":34,"stockId":27,"quantity":12,"lockQuantity":0,"version":14,"stockName":"销售一退货库","stockSign":null,"productName":"泰钢耐火纤维板","productSoleCode":"泰钢耐火纤维板","productSimpleCode":"泰钢耐火纤维板","productSpec":"600*400*10","productUnit":"吨","productWeight":10,"deptId":120,"deptName":"销售一公司","quantityDetailList":null,"quantityFlowList":null},{"createdBy":803,"createdByName":null,"createdTime":"2020-03-30 16:12:34","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":113,"productId":16402,"stockId":599,"quantity":0.39,"lockQuantity":0.1,"version":6,"stockName":"销售四退货库","stockSign":null,"productName":"测试单元","productSoleCode":"pinhao","productSimpleCode":"tuhao","productSpec":"1*2","productUnit":"个","productWeight":1,"deptId":117,"deptName":"销售四公司","quantityDetailList":null,"quantityFlowList":null},{"createdBy":705,"createdByName":null,"createdTime":"2020-04-01 11:07:22","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":121,"productId":31,"stockId":27,"quantity":1,"lockQuantity":0,"version":1,"stockName":"销售一退货库","stockSign":null,"productName":"塞棒","productSoleCode":"70TNB393001","productSimpleCode":"B393","productSpec":"1530","productUnit":"支","productWeight":0,"deptId":120,"deptName":"销售一公司","quantityDetailList":null,"quantityFlowList":null},{"createdBy":705,"createdByName":null,"createdTime":"2020-04-01 11:09:17","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":123,"productId":16404,"stockId":599,"quantity":1,"lockQuantity":0,"version":1,"stockName":"销售四退货库","stockSign":null,"productName":"垫片","productSoleCode":"wer","productSimpleCode":"wer","productSpec":"25*30*5","productUnit":"件","productWeight":35,"deptId":117,"deptName":"销售四公司","quantityDetailList":null,"quantityFlowList":null},{"createdBy":705,"createdByName":null,"createdTime":"2020-04-01 11:15:44","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":124,"productId":29,"stockId":27,"quantity":1.155,"lockQuantity":0,"version":1,"stockName":"销售一退货库","stockSign":null,"productName":"保护渣","productSoleCode":"70BHZBHZ1-1001","productSimpleCode":"BHZ1-1","productSpec":"165*320(Q195)","productUnit":"支","productWeight":1000,"deptId":120,"deptName":"销售一公司","quantityDetailList":null,"quantityFlowList":null}]
* total : 6
* size : 10
* current : 1
* orders : []
* searchCount : true
* pages : 1
*/
private
int
total
;
private
int
size
;
private
int
current
;
private
boolean
searchCount
;
private
int
pages
;
private
List
<
RecordsBean
>
records
;
private
List
<?>
orders
;
public
int
getTotal
()
{
return
total
;
}
public
void
setTotal
(
int
total
)
{
this
.
total
=
total
;
}
public
int
getSize
()
{
return
size
;
}
public
void
setSize
(
int
size
)
{
this
.
size
=
size
;
}
public
int
getCurrent
()
{
return
current
;
}
public
void
setCurrent
(
int
current
)
{
this
.
current
=
current
;
}
public
boolean
isSearchCount
()
{
return
searchCount
;
}
public
void
setSearchCount
(
boolean
searchCount
)
{
this
.
searchCount
=
searchCount
;
}
public
int
getPages
()
{
return
pages
;
}
public
void
setPages
(
int
pages
)
{
this
.
pages
=
pages
;
}
public
List
<
RecordsBean
>
getRecords
()
{
return
records
;
}
public
void
setRecords
(
List
<
RecordsBean
>
records
)
{
this
.
records
=
records
;
}
public
List
<?>
getOrders
()
{
return
orders
;
}
public
void
setOrders
(
List
<?>
orders
)
{
this
.
orders
=
orders
;
}
public
static
class
RecordsBean
{
/**
* createdBy : 677
* createdByName : null
* createdTime : 2020-02-25 10:45:21
* updatedBy : null
* updatedByName : null
* updatedTime : null
* id : 104
* productId : 32
* stockId : 27
* quantity : 8.0
* lockQuantity : 0.0
* version : 5
* stockName : 销售一退货库
* stockSign : null
* productName : 浸入式水口(方坯)
* productSoleCode : 70LTJ568-1001
* productSimpleCode : J568-1
* productSpec : 90
* productUnit : 支
* productWeight : 0.0
* deptId : 120
* deptName : 销售一公司
* quantityDetailList : null
* quantityFlowList : null
*/
private
int
createdBy
;
private
Object
createdByName
;
private
String
createdTime
;
private
Object
updatedBy
;
private
Object
updatedByName
;
private
Object
updatedTime
;
private
int
id
;
private
int
productId
;
private
int
stockId
;
private
double
quantity
;
private
double
lockQuantity
;
private
int
version
;
private
String
stockName
;
private
Object
stockSign
;
private
String
productName
;
private
String
productSoleCode
;
private
String
productSimpleCode
;
private
String
productSpec
;
private
String
productUnit
;
private
double
productWeight
;
private
int
deptId
;
private
String
deptName
;
private
Object
quantityDetailList
;
private
Object
quantityFlowList
;
private
String
chooseNum
;
public
String
getChooseNum
()
{
return
chooseNum
;
}
public
void
setChooseNum
(
String
chooseNum
)
{
this
.
chooseNum
=
chooseNum
;
}
public
int
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
int
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Object
getCreatedByName
()
{
return
createdByName
;
}
public
void
setCreatedByName
(
Object
createdByName
)
{
this
.
createdByName
=
createdByName
;
}
public
String
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Object
getUpdatedBy
()
{
return
updatedBy
;
}
public
void
setUpdatedBy
(
Object
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
public
Object
getUpdatedByName
()
{
return
updatedByName
;
}
public
void
setUpdatedByName
(
Object
updatedByName
)
{
this
.
updatedByName
=
updatedByName
;
}
public
Object
getUpdatedTime
()
{
return
updatedTime
;
}
public
void
setUpdatedTime
(
Object
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getProductId
()
{
return
productId
;
}
public
void
setProductId
(
int
productId
)
{
this
.
productId
=
productId
;
}
public
int
getStockId
()
{
return
stockId
;
}
public
void
setStockId
(
int
stockId
)
{
this
.
stockId
=
stockId
;
}
public
double
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
double
quantity
)
{
this
.
quantity
=
quantity
;
}
public
double
getLockQuantity
()
{
return
lockQuantity
;
}
public
void
setLockQuantity
(
double
lockQuantity
)
{
this
.
lockQuantity
=
lockQuantity
;
}
public
int
getVersion
()
{
return
version
;
}
public
void
setVersion
(
int
version
)
{
this
.
version
=
version
;
}
public
String
getStockName
()
{
return
stockName
;
}
public
void
setStockName
(
String
stockName
)
{
this
.
stockName
=
stockName
;
}
public
Object
getStockSign
()
{
return
stockSign
;
}
public
void
setStockSign
(
Object
stockSign
)
{
this
.
stockSign
=
stockSign
;
}
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
String
getProductSoleCode
()
{
return
productSoleCode
;
}
public
void
setProductSoleCode
(
String
productSoleCode
)
{
this
.
productSoleCode
=
productSoleCode
;
}
public
String
getProductSimpleCode
()
{
return
productSimpleCode
;
}
public
void
setProductSimpleCode
(
String
productSimpleCode
)
{
this
.
productSimpleCode
=
productSimpleCode
;
}
public
String
getProductSpec
()
{
return
productSpec
;
}
public
void
setProductSpec
(
String
productSpec
)
{
this
.
productSpec
=
productSpec
;
}
public
String
getProductUnit
()
{
return
productUnit
;
}
public
void
setProductUnit
(
String
productUnit
)
{
this
.
productUnit
=
productUnit
;
}
public
double
getProductWeight
()
{
return
productWeight
;
}
public
void
setProductWeight
(
double
productWeight
)
{
this
.
productWeight
=
productWeight
;
}
public
int
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
int
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
Object
getQuantityDetailList
()
{
return
quantityDetailList
;
}
public
void
setQuantityDetailList
(
Object
quantityDetailList
)
{
this
.
quantityDetailList
=
quantityDetailList
;
}
public
Object
getQuantityFlowList
()
{
return
quantityFlowList
;
}
public
void
setQuantityFlowList
(
Object
quantityFlowList
)
{
this
.
quantityFlowList
=
quantityFlowList
;
}
}
}
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
1fe1c23c
...
@@ -1042,4 +1042,22 @@ public interface ApiService {
...
@@ -1042,4 +1042,22 @@ public interface ApiService {
@Multipart
@Multipart
@POST
(
"/open/uploadImgs"
)
@POST
(
"/open/uploadImgs"
)
Observable
<
JSONObject
>
upload
(
@Part
MultipartBody
.
Part
avatar
);
Observable
<
JSONObject
>
upload
(
@Part
MultipartBody
.
Part
avatar
);
/**
* 取产品源(获取退货仓库产品数量)
*
* @return
*/
@GET
(
"/stockQuantity/return-stock/page/list"
)
Observable
<
BaseBean
>
tradingPro
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET
(
"/product/search-list"
)
Observable
<
BaseBean
>
tradingProDialog
(
@Query
(
"soleCode"
)
String
soleCode
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreOutsourcingActivity.java
浏览文件 @
1fe1c23c
...
@@ -90,11 +90,11 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
...
@@ -90,11 +90,11 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
}
}
@OnClick
({
R
.
id
.
rl_client
,
R
.
id
.
rl_dep
,
R
.
id
.
rl_process
,
R
.
id
.
rl_product
,
R
.
id
.
rl_supplier
})
@OnClick
({
R
.
id
.
rl_client
,
R
.
id
.
rl_dep
,
R
.
id
.
rl_process
,
R
.
id
.
rl_product
,
R
.
id
.
rl_supplier
})
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
rl_client
:
case
R
.
id
.
rl_client
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"code"
,
"CUSTOMER"
);
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"code"
,
"CUSTOMER"
);
break
;
break
;
case
R
.
id
.
rl_dep
:
case
R
.
id
.
rl_dep
:
depDialog
.
show
();
depDialog
.
show
();
...
@@ -109,7 +109,7 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
...
@@ -109,7 +109,7 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
return
;
return
;
}
}
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10002
,
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10002
,
"depId"
,
chooseDep
.
getId
()+
""
,
"flag"
,
"1"
,
"code"
,
"SUPPLIER"
,
"supplier"
,
"选择供应商"
);
"depId"
,
chooseDep
.
getId
()
+
""
,
"flag"
,
"1"
,
"code"
,
"SUPPLIER"
,
"supplier"
,
"选择供应商"
);
break
;
break
;
case
R
.
id
.
rl_process
:
case
R
.
id
.
rl_process
:
if
(
clientId
==
null
)
{
if
(
clientId
==
null
)
{
...
@@ -143,6 +143,7 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
...
@@ -143,6 +143,7 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
"transitPartId"
,
supplierId
.
toString
(),
"transitPartId"
,
supplierId
.
toString
(),
"supplierId"
,
supplierId
.
toString
(),
"supplierId"
,
supplierId
.
toString
(),
"supplierName"
,
tvSupplier
.
getText
().
toString
(),
"supplierName"
,
tvSupplier
.
getText
().
toString
(),
"subProcessId"
,
chooseProcess
.
getId
()
+
""
,
"code"
,
PermissionType
.
PROCESS_PURCHASE
.
getCode
());
"code"
,
PermissionType
.
PROCESS_PURCHASE
.
getCode
());
break
;
break
;
}
}
...
@@ -196,7 +197,7 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
...
@@ -196,7 +197,7 @@ public class StoreOutsourcingActivity extends WorkToolBarActivity implements Bat
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
tvClient
.
setText
(
clientName
);
tvClient
.
setText
(
clientName
);
batSalePresenter
.
getProcess
(
PermissionType
.
PROCESS_SALE
.
getCode
(),
clientId
);
batSalePresenter
.
getProcess
(
PermissionType
.
PROCESS_SALE
.
getCode
(),
clientId
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
10002
)
{
}
else
if
(
requestCode
==
10002
&&
resultCode
==
10002
)
{
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
supplierId
=
data
.
getIntExtra
(
"id"
,
0
);
supplierId
=
data
.
getIntExtra
(
"id"
,
0
);
tvSupplier
.
setText
(
clientName
);
tvSupplier
.
setText
(
clientName
);
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleCarActivity.java
浏览文件 @
1fe1c23c
...
@@ -105,6 +105,7 @@ public class StoreSaleCarActivity extends WorkToolBarActivity {
...
@@ -105,6 +105,7 @@ public class StoreSaleCarActivity extends WorkToolBarActivity {
startActivity
(
StoreSaleConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
startActivity
(
StoreSaleConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"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"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
),
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleConfirmActivity.java
浏览文件 @
1fe1c23c
...
@@ -64,7 +64,7 @@ import okhttp3.MultipartBody;
...
@@ -64,7 +64,7 @@ import okhttp3.MultipartBody;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
/**
/**
* 商店-销售-产品-确认订单
* 商店-销售
/供应/外采购
-产品-确认订单
* author : flexible
* author : flexible
* email : lgd19940421@163.com
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
* github: https://github.com/FlexibleXd
...
@@ -149,16 +149,16 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
...
@@ -149,16 +149,16 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
proAdapter
.
notifyDataSetChanged
();
proAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
changeNumAndPrice
();
param
=
new
HashMap
<>();
param
=
new
HashMap
<>();
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"supplierId"
)))
{
if
(
!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"supplierId"
)))
{
param
.
put
(
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
));
param
.
put
(
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
));
}
}
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"subProcess
"
)))
{
if
(
!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"subProcessId
"
)))
{
param
.
put
(
"subProcessId"
,
getIntent
().
getStringExtra
(
"subProcess"
));
param
.
put
(
"subProcessId"
,
getIntent
().
getStringExtra
(
"subProcess
Id
"
));
}
}
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"customerId"
)))
{
if
(
!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"customerId"
)))
{
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
}
}
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"inStockId"
)))
{
if
(
!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"inStockId"
)))
{
param
.
put
(
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
));
param
.
put
(
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
));
}
}
param
.
put
(
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
));
param
.
put
(
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
));
...
@@ -335,7 +335,7 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
...
@@ -335,7 +335,7 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
tvNum
.
setText
(
"共 "
.
concat
(
proList
.
size
()
+
""
).
concat
(
" 件"
));
tvNum
.
setText
(
"共 "
.
concat
(
proList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
2
),
2
);
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
2
),
2
);
}
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
}
...
@@ -350,10 +350,10 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
...
@@ -350,10 +350,10 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
proList
.
get
(
position
).
setFactoryId
(
clientId
);
proList
.
get
(
position
).
setFactoryId
(
clientId
);
proList
.
get
(
position
).
setFactoryName
(
name
);
proList
.
get
(
position
).
setFactoryName
(
name
);
proAdapter
.
notifyItemChanged
(
position
);
proAdapter
.
notifyItemChanged
(
position
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
RESULT_OK
)
{
}
else
if
(
requestCode
==
10002
&&
resultCode
==
RESULT_OK
)
{
if
(
Matisse
.
obtainResult
(
data
).
size
()
!=
0
)
{
if
(
Matisse
.
obtainResult
(
data
).
size
()
!=
0
)
{
showLoading
();
showLoading
();
File
file
=
WorkUtils
.
uriToFile
(
Matisse
.
obtainResult
(
data
).
get
(
0
),
this
);
File
file
=
WorkUtils
.
uriToFile
(
Matisse
.
obtainResult
(
data
).
get
(
0
),
this
);
RequestBody
requestFile
=
RequestBody
.
create
(
MediaType
.
parse
(
"multipart/form-data"
),
file
);
RequestBody
requestFile
=
RequestBody
.
create
(
MediaType
.
parse
(
"multipart/form-data"
),
file
);
RtfHelper
.
getInstance
().
getApiService
(
ApiService
.
class
).
RtfHelper
.
getInstance
().
getApiService
(
ApiService
.
class
).
upload
(
MultipartBody
.
Part
.
createFormData
(
"newUploadImgs"
,
file
.
getName
(),
requestFile
)).
upload
(
MultipartBody
.
Part
.
createFormData
(
"newUploadImgs"
,
file
.
getName
(),
requestFile
)).
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleProductActivity.java
浏览文件 @
1fe1c23c
...
@@ -295,6 +295,8 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
...
@@ -295,6 +295,8 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
"pro"
,
JSON
.
toJSONString
(
carList
),
"pro"
,
JSON
.
toJSONString
(
carList
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"subProcessId"
,
getIntent
().
getStringExtra
(
"subProcessId"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"depId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"depId"
),
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingActivity.java
浏览文件 @
1fe1c23c
...
@@ -103,7 +103,8 @@ public class StoreTradingActivity extends WorkToolBarActivity implements BatSale
...
@@ -103,7 +103,8 @@ public class StoreTradingActivity extends WorkToolBarActivity implements BatSale
toast
(
"请选择入库仓库"
);
toast
(
"请选择入库仓库"
);
return
;
return
;
}
}
startActivity
(
StoreSaleProductActivity
.
class
,
"depId"
,
chooseDep
.
getId
()
+
""
,
startActivity
(
StoreTradingProductActivity
.
class
,
"depId"
,
chooseDep
.
getId
()
+
""
,
"inStockId"
,
chooseStock
.
getId
()
+
""
,
"depName"
,
chooseDep
.
getName
(),
"code"
,
PermissionType
.
PROCESS_INSIDE
.
getCode
());
"depName"
,
chooseDep
.
getName
(),
"code"
,
PermissionType
.
PROCESS_INSIDE
.
getCode
());
break
;
break
;
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingCarActivity.java
0 → 100644
浏览文件 @
1fe1c23c
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.AddAndReduceDoubleView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
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
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
/**
* 商店-销售-购物车
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
StoreTradingCarActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R
.
id
.
tv_ok
)
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
)
AddAndReduceDoubleView
arUseNum
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
private
List
<
ProductBean
.
RecordsBean
>
productList
;
private
TradingProCarAdapter
productAdapter
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
Map
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"pro"
),
Map
.
class
);
TradingBean
.
RecordsBean
pro
=
JSON
.
parseObject
(
data
.
get
(
"pro"
).
toString
(),
TradingBean
.
RecordsBean
.
class
);
tvName
.
setText
(
pro
.
getProductName
());
tvCard
.
setText
(
pro
.
getProductSimpleCode
());
tvCardName
.
setText
(
pro
.
getProductSoleCode
());
tvApplyNum
.
setText
(
String
.
valueOf
(
pro
.
getQuantity
()));
tvDept
.
setText
(
pro
.
getDeptName
());
arUseNum
.
setMaxNum
(
pro
.
getQuantity
());
arUseNum
.
setNumber
(
Double
.
valueOf
(
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
(),
ProductBean
.
RecordsBean
.
class
));
productAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
}
@Override
protected
void
initEvent
()
{
// productAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
// @Override
// public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
// QMUIDialog.MessageDialogBuilder dialog = DialogUtils.okAndCancelDialog(StoreTradingCarActivity.this);
// dialog.setMessage("是否删除").addAction("取消", new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
// dialog.dismiss();
// }
// }).addAction("确定", new QMUIDialogAction.ActionListener() {
// @Override
// public void onClick(QMUIDialog dialog, int index) {
// dialog.dismiss();
// productList.remove(position);
// productAdapter.notifyDataSetChanged();
// EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(productList)));
// }
// }).show();
// }
// });
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_treading_shopcar
;
}
@OnClick
(
R
.
id
.
tv_ok
)
public
void
onViewClicked
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
2
),
2
);
}
startActivity
(
StoreTradingConfirmActivity
.
class
,
"pro"
,
getIntent
().
getStringExtra
(
"pro"
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
),
"launchOrderAmount"
,
allPrice
);
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
onMessageEvent
(
ModifyCarEvent
event
)
{
changeNumAndPrice
();
}
private
void
changeNumAndPrice
()
{
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
2
),
2
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingConfirmActivity.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
store
;
import
android.Manifest
;
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
;
import
com.bigkoo.pickerview.listener.OnTimeSelectListener
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
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
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.TradingConfimProAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.Glide4Engine
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.PickTimeUtils
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.zhihu.matisse.Matisse
;
import
com.zhihu.matisse.MimeType
;
import
com.zhihu.matisse.internal.entity.CaptureStrategy
;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
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
;
import
okhttp3.MultipartBody
;
import
okhttp3.RequestBody
;
/**
* 商店-销售-产品-确认订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
StoreTradingConfirmActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R
.
id
.
tv_ok
)
TextView
tvOk
;
@BindView
(
R
.
id
.
ll_bottom
)
RelativeLayout
llBottom
;
@BindView
(
R
.
id
.
rv_pro
)
RecyclerView
rvPro
;
@BindView
(
R
.
id
.
tv_set
)
TextView
tvSet
;
@BindView
(
R
.
id
.
rl_set
)
RelativeLayout
rlSet
;
@BindView
(
R
.
id
.
tv_time
)
TextView
tvTime
;
@BindView
(
R
.
id
.
rl_time
)
RelativeLayout
rlTime
;
@BindView
(
R
.
id
.
et_address
)
EditText
etAddress
;
@BindView
(
R
.
id
.
et_input1
)
EditText
etInput1
;
@BindView
(
R
.
id
.
tv_input1
)
TextView
tvInput1
;
@BindView
(
R
.
id
.
et_input2
)
EditText
etInput2
;
@BindView
(
R
.
id
.
tv_input2
)
TextView
tvInput2
;
@BindView
(
R
.
id
.
et_input3
)
EditText
etInput3
;
@BindView
(
R
.
id
.
tv_input3
)
TextView
tvInput3
;
@BindView
(
R
.
id
.
et_input4
)
EditText
etInput4
;
@BindView
(
R
.
id
.
tv_input4
)
TextView
tvInput4
;
@BindView
(
R
.
id
.
et_input5
)
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
TradingConfimProAdapter
proAdapter
;
private
QMUIDialog
.
MenuDialogBuilder
setDialog
;
private
String
[]
setArray
=
new
String
[]{
"钢控"
,
"锆碳"
};
private
Map
<
String
,
Object
>
param
;
private
Map
<
String
,
Object
>
expandInfo
;
private
List
<
JSONObject
>
orderItems
;
private
Integer
choosePosition
;
private
TradingBean
.
RecordsBean
pro
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvPro
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
setDialog
=
DialogUtils
.
listDialog
(
this
);
setDialog
.
addItems
(
setArray
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
if
(
which
==
0
)
{
expandInfo
.
put
(
"outdeptLedger"
,
"gk"
);
}
else
{
expandInfo
.
put
(
"outdeptLedger"
,
"gt"
);
}
tvSet
.
setText
(
setArray
[
which
]);
dialog
.
dismiss
();
}
});
}
@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
(),
ProductBean
.
RecordsBean
.
class
));
proAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
param
=
new
HashMap
<>();
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"supplierId"
)))
{
param
.
put
(
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
));
}
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"subProcess"
)))
{
param
.
put
(
"subProcessId"
,
getIntent
().
getStringExtra
(
"subProcess"
));
}
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"customerId"
)))
{
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
}
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"inStockId"
)))
{
param
.
put
(
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
));
}
param
.
put
(
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"receiveDeptId"
));
param
.
put
(
"launchOrderAmount"
,
getIntent
().
getStringExtra
(
"launchOrderAmount"
));
param
.
put
(
"launchUserId"
,
UserKeeper
.
getInstance
().
getUserId
());
param
.
put
(
"launchDeptId"
,
UserKeeper
.
getInstance
().
getUserDepId
());
param
.
put
(
"type"
,
"product"
);
expandInfo
=
new
HashMap
<>();
}
/**
* 转换pro,生成上传参数
*
* @param proList
* @return
*/
private
List
<
JSONObject
>
coverProInfo
(
List
<
ProductBean
.
RecordsBean
>
proList
)
{
List
<
JSONObject
>
orderItems
=
new
ArrayList
<>();
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
"productId"
,
recordsBean
.
getId
());
data
.
put
(
"productCount"
,
recordsBean
.
getCarNum
());
data
.
put
(
"type"
,
"PDS"
);
data
.
put
(
"sourceProductId"
,
pro
.
getId
());
data
.
put
(
"sourceProductCount"
,
pro
.
getChooseNum
());
data
.
put
(
"stockId"
,
pro
.
getStockId
());
data
.
put
(
"annex"
,
recordsBean
.
getUrl
());
orderItems
.
add
(
data
);
}
return
orderItems
;
}
@Override
protected
void
initEvent
()
{
addNumListener
(
etInput1
,
tvInput1
);
addNumListener
(
etInput2
,
tvInput2
);
addNumListener
(
etInput3
,
tvInput3
);
addNumListener
(
etInput4
,
tvInput4
);
addNumListener
(
etInput5
,
tvInput5
);
proAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
rl_upload
:
choosePosition
=
position
;
addImg
();
break
;
}
}
});
}
/**
* 添加字数监听器
*
* @param et
* @param tv
*/
private
void
addNumListener
(
EditText
et
,
TextView
tv
)
{
et
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
tv
.
setText
(
s
.
length
()
+
"/140"
);
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_trading_confirm
;
}
@OnClick
({
R
.
id
.
tv_ok
,
R
.
id
.
rl_set
,
R
.
id
.
rl_time
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_ok
:
if
(
expandInfo
.
get
(
"outdeptLedger"
)
==
null
)
{
toast
(
"请选择账套"
);
return
;
}
if
(
expandInfo
.
get
(
"requireTime"
)
==
null
)
{
toast
(
"请选择客户要求交货时间"
);
return
;
}
expandInfo
.
put
(
"demond1"
,
etInput2
.
getText
().
toString
());
expandInfo
.
put
(
"demond2"
,
etInput3
.
getText
().
toString
());
expandInfo
.
put
(
"demond3"
,
etInput4
.
getText
().
toString
());
expandInfo
.
put
(
"demond4"
,
etAddress
.
getText
().
toString
());
expandInfo
.
put
(
"demond5"
,
etInput1
.
getText
().
toString
());
expandInfo
.
put
(
"comments"
,
etInput5
.
getText
().
toString
());
orderItems
=
coverProInfo
(
proList
);
String
stringByNow
=
TimeUtils
.
getFitTimeSpanByNow
(
tvTime
.
getText
().
toString
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
),
1
);
if
(
stringByNow
.
endsWith
(
"天"
))
{
String
day
=
stringByNow
.
substring
(
0
,
stringByNow
.
length
()
-
1
);
if
(
Integer
.
valueOf
(
day
)
<
30
)
{
QMUIDialog
.
MessageDialogBuilder
builder
=
DialogUtils
.
okAndCancelDialog
(
this
);
builder
.
setTitle
(
"提示"
).
setMessage
(
"交付日期小于30天,订单价格会增加"
).
addAction
(
"取消"
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
}
})
.
addAction
(
"确定"
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
submitOrder
();
dialog
.
dismiss
();
}
}).
show
();
return
;
}
}
submitOrder
();
break
;
case
R
.
id
.
rl_set
:
setDialog
.
show
();
break
;
case
R
.
id
.
rl_time
:
PickTimeUtils
.
showPickThree
(
StoreTradingConfirmActivity
.
this
,
new
OnTimeSelectListener
()
{
@Override
public
void
onTimeSelect
(
Date
date
,
View
v
)
{
String
time
=
TimeUtils
.
date2String
(
date
,
new
SimpleDateFormat
(
"yyyy-MM-dd"
));
expandInfo
.
put
(
"requireTime"
,
time
);
tvTime
.
setText
(
time
);
}
}).
show
();
break
;
}
}
/**
* 下单
*/
private
void
submitOrder
()
{
param
.
put
(
"expandInfo"
,
expandInfo
);
param
.
put
(
"orderItems"
,
orderItems
);
showLoading
();
Observable
<
BaseBean
>
observable
;
String
code
=
getIntent
().
getStringExtra
(
"code"
);
if
(
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_PURCHASE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
submitPurchaseOrder
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_SALE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
submitSaleOrder
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_INSIDE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
submitInsideOrder
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_SUPPLY
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
submitSupplierOrder
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_CRUCIBLE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
submitCrucibleOrder
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
observable
=
RtfUtils
.
getRtf
().
submitPurchaseOrder
(
WorkUtils
.
convertMapToBody
(
param
));
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
toast
(
"下单成功"
);
startActivity
(
StoreOrderSuccessActivity
.
class
);
}
});
}
private
void
changeNumAndPrice
()
{
tvNum
.
setText
(
"共 "
.
concat
(
proList
.
size
()
+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
2
),
2
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
10001
&&
resultCode
==
10001
)
{
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
);
proAdapter
.
notifyItemChanged
(
position
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
RESULT_OK
)
{
if
(
Matisse
.
obtainResult
(
data
).
size
()
!=
0
)
{
showLoading
();
File
file
=
WorkUtils
.
uriToFile
(
Matisse
.
obtainResult
(
data
).
get
(
0
),
this
);
RequestBody
requestFile
=
RequestBody
.
create
(
MediaType
.
parse
(
"multipart/form-data"
),
file
);
RtfHelper
.
getInstance
().
getApiService
(
ApiService
.
class
).
upload
(
MultipartBody
.
Part
.
createFormData
(
"newUploadImgs"
,
file
.
getName
(),
requestFile
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
JSONObject
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
JSONObject
jsonObject
)
{
hideLoading
();
if
(
jsonObject
.
getInteger
(
"status"
)
!=
0
)
{
toast
(
jsonObject
.
getString
(
"msg"
));
return
;
}
toast
(
"上传成功"
);
proList
.
get
(
choosePosition
).
setUrl
(
jsonObject
.
getString
(
"data"
));
coverProInfo
(
proList
);
}
});
}
}
}
private
void
addImg
()
{
RxPermissions
rxPermissions
=
new
RxPermissions
(
this
);
rxPermissions
.
request
(
Manifest
.
permission
.
CAMERA
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
(
granted
->
{
if
(
granted
)
{
// All requested permissions are granted
Matisse
.
from
(
StoreTradingConfirmActivity
.
this
)
.
choose
(
MimeType
.
ofImage
())
.
countable
(
true
)
.
maxSelectable
(
1
).
capture
(
true
).
captureStrategy
(
new
CaptureStrategy
(
true
,
"com.wd.workoffice.fileprovider"
))
// .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))
// .gridExpectedSize(getResources().getDimensionPixelSize(R.dimen.grid_expected_size))
.
restrictOrientation
(
ActivityInfo
.
SCREEN_ORIENTATION_UNSPECIFIED
)
.
thumbnailScale
(
0.85f
)
.
imageEngine
(
new
Glide4Engine
())
.
forResult
(
10002
);
}
else
{
// At least one permission is denied
toast
(
"您需要开启拍照、存储权限!"
);
}
});
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingProductActivity.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
store
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
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.ProductBean
;
import
com.wd.workoffice.bean.TradingBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
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
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.appcompat.app.AlertDialog
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
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
;
/**
* 商店-销售-产品
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
StoreTradingProductActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_choose
)
TextView
tvChoose
;
@BindView
(
R
.
id
.
et_key
)
EditText
etKey
;
@BindView
(
R
.
id
.
btn_search
)
Button
btnSearch
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
@BindView
(
R
.
id
.
tv_receive_dep
)
TextView
tvReceiveDep
;
@BindView
(
R
.
id
.
ll_choose
)
LinearLayout
llChoose
;
private
Map
<
String
,
Object
>
param
;
private
List
<
TradingBean
.
RecordsBean
>
clientList
;
private
TradingProductAdapter
clientAdapter
;
private
int
page
=
1
;
private
List
<
TradingBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
private
String
code
;
Map
<
String
,
Object
>
carMap
=
new
HashMap
<>();
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
code
=
getIntent
().
getStringExtra
(
"code"
);
if
(
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_INSIDE
.
getCode
()))
{
tvReceiveDep
.
setText
(
"接单部门:"
+
getIntent
().
getStringExtra
(
"depName"
));
llChoose
.
setVisibility
(
View
.
GONE
);
tvReceiveDep
.
setVisibility
(
View
.
VISIBLE
);
}
etKey
.
setHint
(
"输入产品"
);
}
private
void
openDialog
(
TradingBean
.
RecordsBean
quantity
,
List
<
ProductBean
.
RecordsBean
>
data
)
{
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
);
AddAndReduceDoubleView
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
);
tradingProDetailAdapter
.
bindToRecyclerView
(
rvProduct
);
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
double
number
=
useNum
.
getNumber
();
if
(
number
==
0
d
)
{
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
)
{
toast
(
"请选择置换产品"
);
return
;
}
quantity
.
setChooseNum
(
String
.
valueOf
(
useNum
.
getNumber
()));
addCart
(
quantity
,
info
,
num
.
getNumber
());
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
addCart
(
TradingBean
.
RecordsBean
quantity
,
List
<
ProductBean
.
RecordsBean
>
data
,
int
number
)
{
for
(
ProductBean
.
RecordsBean
bean
:
data
)
{
bean
.
setCarNum
(
number
);
}
carMap
.
put
(
"pro"
,
JSON
.
toJSONString
(
quantity
));
carMap
.
put
(
"proDetail"
,
JSON
.
toJSONString
(
data
));
toast
(
"加入购物车成功"
);
}
@Override
protected
void
initData
()
{
clientList
=
new
ArrayList
<>();
clientAdapter
=
new
TradingProductAdapter
(
R
.
layout
.
item_trading_product
,
clientList
);
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"current"
,
1
);
param
.
put
(
"deptId"
,
getIntent
().
getStringExtra
(
"depId"
));
getData
();
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
tradingPro
(
param
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
List
<
TradingBean
.
RecordsBean
>
dataList
;
TradingBean
jsonData
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
TradingBean
.
class
);
if
(
jsonData
!=
null
)
{
dataList
=
jsonData
.
getRecords
();
}
else
{
dataList
=
new
ArrayList
<>();
}
if
(
page
==
1
)
{
clientList
.
clear
();
clientList
.
addAll
(
dataList
);
clientAdapter
.
notifyDataSetChanged
();
clientAdapter
.
loadMoreComplete
();
}
else
{
clientAdapter
.
loadMoreComplete
();
clientList
.
addAll
(
dataList
);
clientAdapter
.
notifyDataSetChanged
();
}
if
(
dataList
.
size
()
==
0
)
{
clientAdapter
.
loadMoreEnd
();
}
else
{
page
++;
}
}
});
}
@Override
protected
void
initEvent
()
{
clientAdapter
.
setOnLoadMoreListener
(
new
BaseQuickAdapter
.
RequestLoadMoreListener
()
{
@Override
public
void
onLoadMoreRequested
()
{
param
.
put
(
"current"
,
page
);
getData
();
}
},
rvProduct
);
clientAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
getDialogDetail
(
clientList
.
get
(
position
));
}
});
}
private
void
getDialogDetail
(
TradingBean
.
RecordsBean
soleCode
)
{
showLoading
();
RtfUtils
.
getRtf
().
tradingProDialog
(
soleCode
.
getProductSoleCode
()).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
List
<
ProductBean
.
RecordsBean
>
productBean
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
ProductBean
.
RecordsBean
.
class
);
openDialog
(
soleCode
,
productBean
);
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_bat_sale_product
;
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
menu_store_cart
,
menu
);
return
super
.
onCreateOptionsMenu
(
menu
);
}
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
cart
:
if
(!
carMap
.
containsKey
(
"pro"
))
{
toast
(
"购物车没有产品"
);
return
super
.
onOptionsItemSelected
(
item
);
}
startActivity
(
StoreTradingCarActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
carMap
),
"supplierId"
,
getIntent
().
getStringExtra
(
"supplierId"
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"inStockId"
,
getIntent
().
getStringExtra
(
"inStockId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"depId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
));
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
}
@OnClick
({
R
.
id
.
tv_choose
,
R
.
id
.
btn_search
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_choose
:
finish
();
break
;
case
R
.
id
.
btn_search
:
param
.
put
(
"searchValue"
,
etKey
.
getText
().
toString
());
param
.
put
(
"current"
,
1
);
page
=
1
;
getData
();
break
;
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
onMessageEvent
(
ModifyCarEvent
event
)
{
String
pro
=
event
.
getPro
();
carMap
.
put
(
"proDetail"
,
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
浏览文件 @
1fe1c23c
...
@@ -46,7 +46,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
...
@@ -46,7 +46,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
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
(
String
.
valueOf
(
item
.
getInternalPrice
())));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
get
CarPrice
()
,
2
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
get
InternalPrice
()+
""
,
2
));
if
(
type
==
1
)
{
if
(
type
==
1
)
{
helper
.
addOnClickListener
(
R
.
id
.
rl_choose_dep
);
helper
.
addOnClickListener
(
R
.
id
.
rl_choose_dep
);
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/TradingConfimProAdapter.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.widget.EditText
;
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.ProductBean
;
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.List
;
import
flexible.xd.android_base.utils.ToastUtil
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
TradingConfimProAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
public
TradingConfimProAdapter
(
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_num
,
String
.
valueOf
(
item
.
getCarNum
()));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
getInternalPrice
()
+
""
,
2
));
helper
.
addOnClickListener
(
R
.
id
.
rl_upload
);
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProCarAdapter.java
0 → 100644
浏览文件 @
1fe1c23c
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.ProductBean
;
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
<
ProductBean
.
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
,
String
.
valueOf
(
item
.
getInternalPrice
()));
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
getInternalPrice
()
+
""
,
2
));
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setNumber
(
item
.
getCarNum
());
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
int
vs
)
{
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
"小计:"
+
MathUtils
.
multiply
(
vs
+
""
,
item
.
getInternalPrice
()
+
""
,
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProDetailAdapter.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
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
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
TradingProDetailAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
Map
<
Integer
,
Boolean
>
isChoose
=
new
HashMap
<>();
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_card_name
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
valueOf
(
item
.
getInternalPrice
()));
CheckBox
cbChoose
=
helper
.
getView
(
R
.
id
.
cb_check
);
cbChoose
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
isChoose
.
put
(
helper
.
getAdapterPosition
(),
cbChoose
.
isChecked
());
}
});
}
public
Map
<
Integer
,
Boolean
>
getIsChoose
()
{
return
isChoose
;
}
public
void
setIsChoose
(
Map
<
Integer
,
Boolean
>
isChoose
)
{
this
.
isChoose
=
isChoose
;
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/TradingProductAdapter.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
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
java.util.List
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
TradingProductAdapter
extends
BaseQuickAdapter
<
TradingBean
.
RecordsBean
,
BaseViewHolder
>
{
public
TradingProductAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
TradingBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductName
()
);
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getProductSimpleCode
()
);
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
());
helper
.
addOnClickListener
(
R
.
id
.
tv_cart
);
}
}
app/src/main/java/com/wd/workoffice/util/DialogUtils.java
浏览文件 @
1fe1c23c
...
@@ -11,8 +11,6 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
...
@@ -11,8 +11,6 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
**/
**/
public
class
DialogUtils
{
public
class
DialogUtils
{
public
static
QMUIDialog
.
MenuDialogBuilder
listDialog
(
Context
context
)
{
public
static
QMUIDialog
.
MenuDialogBuilder
listDialog
(
Context
context
)
{
QMUIDialog
.
MenuDialogBuilder
dialog
=
new
QMUIDialog
.
MenuDialogBuilder
(
context
);
QMUIDialog
.
MenuDialogBuilder
dialog
=
new
QMUIDialog
.
MenuDialogBuilder
(
context
);
return
dialog
;
return
dialog
;
...
...
app/src/main/java/com/wd/workoffice/widget/AddAndReduceDoubleView.java
0 → 100644
浏览文件 @
1fe1c23c
package
com
.
wd
.
workoffice
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.wd.workoffice.R
;
import
flexible.xd.android_base.utils.ToastUtil
;
public
class
AddAndReduceDoubleView
extends
LinearLayout
implements
View
.
OnClickListener
{
private
final
Button
add
;
private
final
Button
remove
;
private
final
TextView
tvNum
;
private
double
num
=
0
;
private
double
maxNum
=
10000
;
public
AddAndReduceDoubleView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
view_add_remove
,
this
);
add
=
findViewById
(
R
.
id
.
btn_add
);
remove
=
findViewById
(
R
.
id
.
btn_reduce
);
tvNum
=
findViewById
(
R
.
id
.
tv_num
);
tvNum
.
setText
(
"0"
);
add
.
setOnClickListener
(
this
);
remove
.
setOnClickListener
(
this
);
}
public
void
setNumber
(
double
number
)
{
num
=
number
;
tvNum
.
setText
(
number
+
""
);
}
public
double
getNumber
()
{
return
num
;
}
@Override
public
void
onClick
(
View
v
)
{
String
s
=
tvNum
.
getText
().
toString
();
num
=
Double
.
parseDouble
(
s
);
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_add
:
if
(
maxNum
-
num
<
1
)
{
num
=
maxNum
;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
mOnNumberChangedListener
.
OnNumberChanged
(
String
.
valueOf
(
num
));
ToastUtil
.
showShort
(
"目前已选择最大数量"
);
return
;
}
num
++;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
mOnNumberChangedListener
.
OnNumberChanged
(
String
.
valueOf
(
num
));
break
;
case
R
.
id
.
btn_reduce
:
if
(
num
<
1
)
{
Toast
.
makeText
(
getContext
(),
"不能小于0"
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
num
--;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
mOnNumberChangedListener
.
OnNumberChanged
(
String
.
valueOf
(
num
));
}
break
;
}
}
public
double
getMaxNum
()
{
return
maxNum
;
}
public
void
setMaxNum
(
double
maxNum
)
{
this
.
maxNum
=
maxNum
;
}
public
interface
OnNumberChangedListener
{
void
OnNumberChanged
(
String
vs
);
}
private
OnNumberChangedListener
mOnNumberChangedListener
;
public
void
setOnNumberChangedListener
(
OnNumberChangedListener
onNumberChangedListener
)
{
mOnNumberChangedListener
=
onNumberChangedListener
;
}
}
app/src/main/res/layout/activity_trading_confirm.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_marginLeft=
"15mm"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"共 0 件"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:text=
"总计: ¥ "
android:textSize=
"16sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"80mm"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:background=
"@color/red_btn_bg"
android:gravity=
"center"
android:text=
"申请下单"
android:textColor=
"@color/white"
/>
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
android:background=
"@color/white"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
android:orientation=
"vertical"
android:paddingBottom=
"20mm"
>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
>
<View
android:layout_width=
"8mm"
android:layout_height=
"18mm"
android:background=
"@color/red_btn_bg"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"货品信息"
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"
android:layout_height=
"wrap_content"
/>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
>
<View
android:layout_width=
"8mm"
android:layout_height=
"18mm"
android:background=
"@color/red_btn_bg"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"订单信息"
android:textSize=
"16sp"
/>
</LinearLayout>
<RelativeLayout
android:id=
"@+id/rl_set"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"9mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:text=
"选择账套"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_set"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_marginRight=
"3mm"
android:text=
"请选择账套"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<ImageView
android:layout_width=
"15mm"
android:layout_height=
"20mm"
android:src=
"@mipmap/arrow_right_gray"
/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/rl_time"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"9mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:text=
"交货时间"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_marginRight=
"3mm"
android:text=
"选择时间"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<ImageView
android:layout_width=
"15mm"
android:layout_height=
"20mm"
android:src=
"@mipmap/arrow_right_gray"
/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"9mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:text=
"交(提)货地点"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<EditText
android:id=
"@+id/et_address"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"10mm"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"right"
android:hint=
"输入地址"
android:padding=
"3mm"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
style=
"@style/ViewX"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"运输方式及费用承担:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_input1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_input1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"质量要求技术标准,供方对质量负责的条件和期限:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_input2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_input2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"包装、唛头及发货要求:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_input3"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_input3"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"注意事项:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:background=
"@drawable/shape_confirm_order"
android:hint=
"请输入"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_input4"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_input4"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"备注:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_input5"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_input5"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_treading_shopcar.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_marginLeft=
"15mm"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"共 0 件"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:text=
"总计: ¥ "
android:textSize=
"16sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"80mm"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:background=
"@color/red_btn_bg"
android:gravity=
"center"
android:text=
"申请下单"
android:textColor=
"@color/white"
/>
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
>
<LinearLayout
android:layout_width=
"match_parent"
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.AddAndReduceDoubleView
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"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_trading_confirm_pro.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:background=
"#9FE5F0FD"
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_name"
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_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>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"小计: ¥ "
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_all_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<RelativeLayout
android:id=
"@+id/rl_upload"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingVertical=
"9mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:text=
"上传附件(选填)"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_upload"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_marginRight=
"3mm"
android:text=
"点击上传"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<ImageView
android:layout_width=
"15mm"
android:layout_height=
"20mm"
android:src=
"@mipmap/arrow_right_gray"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_trading_product.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<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_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>
<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>
\ No newline at end of file
app/src/main/res/layout/item_trading_product_car.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<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"
>
<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_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_spec"
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_price"
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>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
>
<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_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_all_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"5mm"
android:gravity=
"center"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"13sp"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_trading_product_dialog.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<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=
"horizontal"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<CheckBox
android:id=
"@+id/cb_check"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
/>
<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_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_spec"
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_price"
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>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/view_add_cart_trading.xml
0 → 100644
浏览文件 @
1fe1c23c
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#d1f8f8f8"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20mm"
android:gravity=
"center"
android:text=
"加入购物车"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"25mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"使用数量"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduceDoubleView
android:id=
"@+id/ar_use_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20mm"
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"
android:layout_height=
"200mm"
android:layout_marginTop=
"5mm"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"25mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"置换数量"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/ar_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30mm"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_cancel"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:paddingVertical=
"15mm"
android:text=
"取消"
android:textColor=
"#007AFF"
android:textSize=
"17sp"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:background=
"#D8DCE6"
/>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:paddingVertical=
"15mm"
android:text=
"确定"
android:textColor=
"#007AFF"
android:textSize=
"17sp"
/>
</LinearLayout>
</LinearLayout>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论