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 个修改的文件
包含
1395 行增加
和
17 行删除
+1395
-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
+0
-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
+0
-0
StoreTradingProductActivity.java
...ce/ui/activity/bat/store/StoreTradingProductActivity.java
+0
-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
+0
-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
差异被折叠。
点击展开。
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
差异被折叠。
点击展开。
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreTradingProductActivity.java
0 → 100644
浏览文件 @
1fe1c23c
差异被折叠。
点击展开。
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
差异被折叠。
点击展开。
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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论