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
be28b80d
提交
be28b80d
authored
4月 14, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.坩埚销售订单
2.//TODO erp用户激活测试,忘记/重置密码测试,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,组装下单,产品下单还差附件测试,mes,刷新token
上级
928f240a
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
1830 行增加
和
18 行删除
+1830
-18
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+40
-1
ProductBean.java
app/src/main/java/com/wd/workoffice/bean/ProductBean.java
+18
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+3
-0
AddCrucibleActivity.java
...workoffice/ui/activity/bat/order/AddCrucibleActivity.java
+113
-0
AddCrucibleCarActivity.java
...koffice/ui/activity/bat/order/AddCrucibleCarActivity.java
+149
-0
AddCrucibleConfirmActivity.java
...ice/ui/activity/bat/order/AddCrucibleConfirmActivity.java
+393
-0
AddCrucibleProductActivity.java
...ice/ui/activity/bat/order/AddCrucibleProductActivity.java
+219
-0
AddCrucibleStockActivity.java
...ffice/ui/activity/bat/order/AddCrucibleStockActivity.java
+150
-0
CrucibleOrderDetailActivity.java
...ce/ui/activity/bat/order/CrucibleOrderDetailActivity.java
+2
-3
AddCrucibleCarAdapter.java
...a/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
+84
-0
AddCrucibleStockAdapter.java
...com/wd/workoffice/ui/adapter/AddCrucibleStockAdapter.java
+26
-0
StoreCarAdapter.java
...in/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
+15
-14
StoreProductAdapter.java
...ava/com/wd/workoffice/ui/adapter/StoreProductAdapter.java
+12
-0
activity_add_crucible.xml
app/src/main/res/layout/activity_add_crucible.xml
+201
-0
activity_add_crucible_pro.xml
app/src/main/res/layout/activity_add_crucible_pro.xml
+37
-0
item_add_crucible_double.xml
app/src/main/res/layout/item_add_crucible_double.xml
+233
-0
item_store_product.xml
app/src/main/res/layout/item_store_product.xml
+23
-0
view_add_cart_double.xml
app/src/main/res/layout/view_add_cart_double.xml
+112
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
be28b80d
...
...
@@ -1032,7 +1032,46 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.order.AddCrucibleStockActivity"
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.order.AddCrucibleActivity"
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.order.AddCrucibleCarActivity"
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.order.AddCrucibleConfirmActivity"
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.order.AddCrucibleProductActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"选择产品"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/bean/ProductBean.java
浏览文件 @
be28b80d
...
...
@@ -168,10 +168,28 @@ public class ProductBean {
private
Object
remark
;
private
String
carPrice
;
private
int
carNum
;
private
double
carDoubleNum
;
private
int
factoryId
;
private
String
factoryName
;
private
String
url
;
private
String
chooseNum
;
private
double
canUseProductSum
;
public
double
getCarDoubleNum
()
{
return
carDoubleNum
;
}
public
void
setCarDoubleNum
(
double
carDoubleNum
)
{
this
.
carDoubleNum
=
carDoubleNum
;
}
public
double
getCanUseProductSum
()
{
return
canUseProductSum
;
}
public
void
setCanUseProductSum
(
double
canUseProductSum
)
{
this
.
canUseProductSum
=
canUseProductSum
;
}
public
String
getChooseNum
()
{
return
chooseNum
;
...
...
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
be28b80d
...
...
@@ -425,6 +425,9 @@ public interface ApiService {
@POST
(
"/crucibleOrder/start"
)
Observable
<
BaseBean
>
submitCrucibleOrder
(
@Body
RequestBody
requestBody
);
@POST
(
"/crucibleSaleOrder"
)
Observable
<
BaseBean
>
submitCrucibleSaleOrder
(
@Body
RequestBody
requestBody
);
/**
* 下单
* <p>
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleActivity.java
0 → 100644
浏览文件 @
be28b80d
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.content.Intent
;
import
android.view.View
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.DepBean
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleProductActivity
;
import
com.wd.workoffice.util.UserKeeper
;
import
androidx.annotation.Nullable
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
/**
* 生成坩埚销售订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
AddCrucibleActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_client
)
TextView
tvClient
;
@BindView
(
R
.
id
.
rl_client
)
RelativeLayout
rlClient
;
@BindView
(
R
.
id
.
tv_stock
)
TextView
tvStock
;
@BindView
(
R
.
id
.
rl_stock
)
RelativeLayout
rlStock
;
@BindView
(
R
.
id
.
tv_product
)
TextView
tvProduct
;
@BindView
(
R
.
id
.
rl_product
)
RelativeLayout
rlProduct
;
private
Integer
clientId
;
private
Integer
stockId
;
private
String
orderId
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
}
@Override
protected
void
initData
()
{
orderId
=
getIntent
().
getStringExtra
(
"orderId"
);
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_add_crucible
;
}
@OnClick
({
R
.
id
.
rl_client
,
R
.
id
.
rl_stock
,
R
.
id
.
rl_product
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
rl_client
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"flag"
,
"1"
,
"code"
,
"CUSTOMER"
,
"depId"
,
UserKeeper
.
getInstance
().
getUserDepId
());
break
;
case
R
.
id
.
rl_stock
:
if
(
clientId
==
null
)
{
toast
(
"请选择客户"
);
return
;
}
startActivityForResult
(
AddCrucibleStockActivity
.
class
,
10002
,
"id"
,
clientId
.
toString
());
break
;
case
R
.
id
.
rl_product
:
if
(
clientId
==
null
)
{
toast
(
"请选择客户"
);
return
;
}
if
(
stockId
==
null
)
{
toast
(
"请选择代管库"
);
return
;
}
startActivity
(
AddCrucibleProductActivity
.
class
,
"procedureOrderId"
,
orderId
,
"pro"
,
getIntent
().
getStringExtra
(
"pro"
),
"customerId"
,
clientId
.
toString
(),
"stockId"
,
stockId
.
toString
(),
"code"
,
PermissionType
.
CRUCIBLE_SELL
.
getCode
());
break
;
}
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
10001
&&
resultCode
==
10001
)
{
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
tvClient
.
setText
(
clientName
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
10002
){
String
clientName
=
data
.
getStringExtra
(
"stockName"
);
stockId
=
data
.
getIntExtra
(
"id"
,
0
);
tvStock
.
setText
(
clientName
);
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleCarActivity.java
0 → 100644
浏览文件 @
be28b80d
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
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.event.ModifyCarEvent
;
import
com.wd.workoffice.ui.adapter.AddCrucibleCarAdapter
;
import
com.wd.workoffice.ui.adapter.StoreCarAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.MathUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.ArrayList
;
import
java.util.List
;
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
AddCrucibleCarActivity
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_product
)
RecyclerView
rvProduct
;
private
List
<
ProductBean
.
RecordsBean
>
productList
;
private
AddCrucibleCarAdapter
productAdapter
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
productList
=
new
ArrayList
<>();
productAdapter
=
new
AddCrucibleCarAdapter
(
R
.
layout
.
item_add_crucible_double
,
productList
);
productAdapter
.
bindToRecyclerView
(
rvProduct
);
String
pro
=
getIntent
().
getStringExtra
(
"pro"
);
productList
.
addAll
(
JSON
.
parseArray
(
pro
,
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
(
AddCrucibleCarActivity
.
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_bat_shopcar
;
}
@OnClick
(
R
.
id
.
tv_ok
)
public
void
onViewClicked
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarDoubleNum
()
+
""
,
recordsBean
.
getInternalPrice
()+
""
,
2
),
2
);
}
// startActivity(StoreSaleConfirmActivity.class, "pro", JSON.toJSONString(productList),
// "subProcess", getIntent().getStringExtra("subProcess"),
// "supplierId",getIntent().getStringExtra("supplierId"),
// "subProcessId", getIntent().getStringExtra("subProcessId"),
// "inStockId",getIntent().getStringExtra("inStockId"),
// "customerId", getIntent().getStringExtra("customerId"),
// "receiveDeptId", getIntent().getStringExtra("receiveDeptId"),
// "code", getIntent().getStringExtra("code"),
// "launchOrderAmount", allPrice);
startActivity
(
AddCrucibleConfirmActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
productList
),
"launchOrderAmount"
,
allPrice
,
"stockId"
,
getIntent
().
getStringExtra
(
"stockId"
),
"procedureOrderId"
,
getIntent
().
getStringExtra
(
"procedureOrderId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
));
}
@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
.
getCarDoubleNum
()
+
""
,
recordsBean
.
getInternalPrice
()+
""
,
2
),
2
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleConfirmActivity.java
0 → 100644
浏览文件 @
be28b80d
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.Manifest
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.pm.ActivityInfo
;
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
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.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.retrofit.ApiService
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreClientFactoryActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreOrderSuccessActivity
;
import
com.wd.workoffice.ui.adapter.StoreCarAdapter
;
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.TimeUtils
;
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
AddCrucibleConfirmActivity
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
;
private
List
<
ProductBean
.
RecordsBean
>
proList
;
private
StoreCarAdapter
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
;
@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
()
{
proList
=
new
ArrayList
<>();
proAdapter
=
new
StoreCarAdapter
(
R
.
layout
.
item_confirm_pro
,
proList
,
1
);
proAdapter
.
bindToRecyclerView
(
rvPro
);
proList
.
addAll
(
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"pro"
),
ProductBean
.
RecordsBean
.
class
));
proAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
param
=
new
HashMap
<>();
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"customerId"
)))
{
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
}
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"stockId"
)))
{
param
.
put
(
"stockId"
,
getIntent
().
getStringExtra
(
"stockId"
));
}
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"procedureOrderId"
)))
{
param
.
put
(
"procedureOrderId"
,
getIntent
().
getStringExtra
(
"procedureOrderId"
));
}
param
.
put
(
"launchOrderAmount"
,
getIntent
().
getStringExtra
(
"launchOrderAmount"
));
param
.
put
(
"launchUserId"
,
UserKeeper
.
getInstance
().
getUserId
());
param
.
put
(
"launchDeptId"
,
UserKeeper
.
getInstance
().
getUserDepId
());
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
(
"type"
,
"PDS"
);
// data.put("tranFromStockId", recordsBean.getCarPrice());
data
.
put
(
"innerPrice"
,
recordsBean
.
getInternalPrice
());
data
.
put
(
"customerBranchFactoryId"
,
recordsBean
.
getFactoryId
());
//3.分厂客户ID
data
.
put
(
"outerPrice"
,
recordsBean
.
getCarPrice
());
data
.
put
(
"productCount"
,
recordsBean
.
getCarDoubleNum
());
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
;
case
R
.
id
.
rl_choose_dep
:
startActivityForResult
(
StoreClientFactoryActivity
.
class
,
10001
,
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"position"
,
position
+
""
);
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_bat_sale_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
);
submitOrder
();
break
;
case
R
.
id
.
rl_set
:
setDialog
.
show
();
break
;
case
R
.
id
.
rl_time
:
PickTimeUtils
.
showPickThree
(
AddCrucibleConfirmActivity
.
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
();
RtfUtils
.
getRtf
().
submitCrucibleSaleOrder
(
WorkUtils
.
convertMapToBody
(
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
;
}
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
.
getCarDoubleNum
()
+
""
,
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
(
AddCrucibleConfirmActivity
.
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/order/AddCrucibleProductActivity.java
0 → 100644
浏览文件 @
be28b80d
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.View
;
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.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity
;
import
com.wd.workoffice.ui.adapter.StoreProductAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.ArrayList
;
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
;
/**
* 坩埚销售产品
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
AddCrucibleProductActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvProduct
;
private
Map
<
String
,
Object
>
param
;
private
List
<
ProductBean
.
RecordsBean
>
clientList
;
private
StoreProductAdapter
clientAdapter
;
private
List
<
ProductBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
private
String
code
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
code
=
getIntent
().
getStringExtra
(
"code"
);
}
private
void
openDialog
(
ProductBean
.
RecordsBean
data
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_add_cart_double
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
AddAndReduceDoubleView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
num
.
setMaxNum
(
data
.
getCanUseProductSum
());
EditText
etPrice
=
view
.
findViewById
(
R
.
id
.
et_price
);
for
(
ProductBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
data
.
getId
()
==
recordsBean
.
getId
())
{
etPrice
.
setText
(
recordsBean
.
getCarPrice
());
num
.
setNumber
(
recordsBean
.
getCarDoubleNum
());
}
}
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(!
TextUtils
.
equals
(
code
,
PermissionType
.
PROCESS_SUPPLY
.
getCode
())
&&
TextUtils
.
isEmpty
(
etPrice
.
getText
().
toString
()))
{
toast
(
"请填写外部价格"
);
return
;
}
if
(
num
.
getNumber
()
==
0
d
)
{
toast
(
"请填写数量"
);
return
;
}
addCart
(
data
,
num
.
getNumber
(),
etPrice
.
getText
().
toString
());
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
/**
* 添加购物车
*
* @param chooseProduct 产品
* @param number 数量
* @param price 单价
*/
private
void
addCart
(
ProductBean
.
RecordsBean
chooseProduct
,
double
number
,
String
price
)
{
boolean
isHas
=
false
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
chooseProduct
.
getId
()
==
recordsBean
.
getId
())
{
isHas
=
true
;
recordsBean
.
setCarDoubleNum
(
number
);
recordsBean
.
setCarPrice
(
price
);
}
}
if
(!
isHas
)
{
chooseProduct
.
setCarDoubleNum
(
number
);
chooseProduct
.
setCarPrice
(
price
);
carList
.
add
(
chooseProduct
);
}
toast
(
"加入购物车成功"
);
}
@Override
protected
void
initData
()
{
clientList
=
new
ArrayList
<>();
clientAdapter
=
new
StoreProductAdapter
(
R
.
layout
.
item_store_product
,
clientList
,
1
);
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"current"
,
1
);
List
<
OrderDetail
.
OrderItemsBean
>
pro
=
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"pro"
),
OrderDetail
.
OrderItemsBean
.
class
);
coverData
(
pro
);
}
private
void
coverData
(
List
<
OrderDetail
.
OrderItemsBean
>
pro
)
{
for
(
OrderDetail
.
OrderItemsBean
orderItemsBean
:
pro
)
{
ProductBean
.
RecordsBean
data
=
new
ProductBean
.
RecordsBean
();
data
.
setName
(
orderItemsBean
.
getProductName
());
data
.
setId
(
orderItemsBean
.
getProductId
());
data
.
setSimpleCode
(
orderItemsBean
.
getProductSimpleCode
());
data
.
setCanUseProductSum
(
orderItemsBean
.
getCanOutStoreProductSum
());
data
.
setInternalPrice
(
orderItemsBean
.
getInnerPrice
());
clientList
.
add
(
data
);
}
clientAdapter
.
notifyDataSetChanged
();
}
@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
)
{
openDialog
(
clientList
.
get
(
position
));
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_add_crucible_pro
;
}
@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
(
carList
.
size
()
==
0
)
{
toast
(
"购物车没有产品"
);
return
super
.
onOptionsItemSelected
(
item
);
}
startActivity
(
AddCrucibleCarActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
carList
),
"stockId"
,
getIntent
().
getStringExtra
(
"stockId"
),
"procedureOrderId"
,
getIntent
().
getStringExtra
(
"procedureOrderId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
));
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
}
@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
();
carList
.
clear
();
carList
.
addAll
(
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/AddCrucibleStockActivity.java
0 → 100644
浏览文件 @
be28b80d
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.content.Intent
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
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.ClientBean
;
import
com.wd.workoffice.bean.StockBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.AddCrucibleStockAdapter
;
import
com.wd.workoffice.ui.adapter.StoreClientAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
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
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
/**
* 选择代管库
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
AddCrucibleStockActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
et_key
)
EditText
etKey
;
@BindView
(
R
.
id
.
btn_search
)
Button
btnSearch
;
@BindView
(
R
.
id
.
rv_client
)
RecyclerView
rvClient
;
private
Map
<
String
,
Object
>
param
;
private
List
<
StockBean
>
clientList
;
private
AddCrucibleStockAdapter
clientAdapter
;
private
int
page
=
1
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvClient
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
clientList
=
new
ArrayList
<>();
clientAdapter
=
new
AddCrucibleStockAdapter
(
R
.
layout
.
item_store_client
,
clientList
);
clientAdapter
.
bindToRecyclerView
(
rvClient
);
clientAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvClient
);
param
=
WorkUtils
.
pageKey
();
String
id
=
getIntent
().
getStringExtra
(
"id"
);
param
.
put
(
"customerId"
,
id
);
getData
();
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
getStock
(
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
<
StockBean
>
dataList
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
StockBean
.
class
);
clientList
.
clear
();
clientList
.
addAll
(
dataList
);
clientAdapter
.
notifyDataSetChanged
();
// 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++;
// }
toast
(
"搜索成功"
);
}
});
}
@Override
protected
void
initEvent
()
{
// clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
// @Override
// public void onLoadMoreRequested() {
// param.put("current", page);
// getData();
// }
// }, rvClient);
clientAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"stockName"
,
clientList
.
get
(
position
).
getName
());
intent
.
putExtra
(
"id"
,
clientList
.
get
(
position
).
getId
());
setResult
(
10002
,
intent
);
finish
();
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_bat_sale_client
;
}
@OnClick
(
R
.
id
.
btn_search
)
public
void
onViewClicked
()
{
param
.
put
(
"stockName"
,
etKey
.
getText
().
toString
());
param
.
put
(
"current"
,
1
);
page
=
1
;
getData
();
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/CrucibleOrderDetailActivity.java
浏览文件 @
be28b80d
...
...
@@ -333,9 +333,8 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
toast
(
"正在加载中,请稍后"
);
return
;
}
startActivity
(
EndApplyActivity
.
class
,
"status"
,
getIntent
().
getStringExtra
(
"status"
),
"orderType"
,
dataBean
.
getExpandInfo
().
getOrderType
(),
startActivity
(
AddCrucibleActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
dataBean
.
getOrderItems
()),
"orderId"
,
getIntent
().
getStringExtra
(
"id"
));
break
;
case
R
.
id
.
tv_send_apply
:
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
0 → 100644
浏览文件 @
be28b80d
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.AddAndReduceDoubleView
;
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
AddCrucibleCarAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
public
AddCrucibleCarAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ProductBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
String
.
valueOf
(
item
.
getInternalPrice
())));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarDoubleNum
()
+
""
,
item
.
getInternalPrice
()
+
""
,
2
));
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceDoubleView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setMaxNum
(
item
.
getCanUseProductSum
());
num
.
setOnNumberChangedListener
(
new
AddAndReduceDoubleView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
String
vs
)
{
item
.
setCarDoubleNum
(
Double
.
valueOf
(
vs
));
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
+
""
,
item
.
getCarPrice
(),
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
etPrice
.
setText
(
item
.
getCarPrice
());
etPrice
.
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
)
{
if
(
TextUtils
.
isEmpty
(
s
))
{
ToastUtil
.
showShort
(
"请输入外部单价"
);
return
;
}
item
.
setCarPrice
(
s
.
toString
());
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()
+
""
,
item
.
getCarPrice
(),
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
num
.
setNumber
(
item
.
getCarDoubleNum
());
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/AddCrucibleStockAdapter.java
0 → 100644
浏览文件 @
be28b80d
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.ClientBean
;
import
com.wd.workoffice.bean.StockBean
;
import
java.util.List
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
AddCrucibleStockAdapter
extends
BaseQuickAdapter
<
StockBean
,
BaseViewHolder
>
{
public
AddCrucibleStockAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
StockBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
浏览文件 @
be28b80d
...
...
@@ -54,6 +54,20 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper
.
setText
(
R
.
id
.
tv_choose_dep
,
item
.
getFactoryName
());
}
}
else
if
(
type
==
2
){
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
int
vs
)
{
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
+
""
,
item
.
getCarPrice
(),
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
helper
.
setGone
(
R
.
id
.
ll_price
,
false
);
num
.
setNumber
(
item
.
getCarNum
());
}
else
{
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
...
...
@@ -89,20 +103,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
}
});
num
.
setNumber
(
item
.
getCarNum
());
}
else
{
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
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
.
getCarPrice
(),
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
helper
.
setGone
(
R
.
id
.
ll_price
,
false
);
num
.
setNumber
(
item
.
getCarNum
());
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/StoreProductAdapter.java
浏览文件 @
be28b80d
...
...
@@ -8,16 +8,24 @@ import com.wd.workoffice.bean.ProductBean;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
StoreProductAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
int
type
;
//1坩埚页面
public
StoreProductAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
public
StoreProductAdapter
(
int
layoutResId
,
@Nullable
List
<
ProductBean
.
RecordsBean
>
data
,
int
type
)
{
super
(
layoutResId
,
data
);
this
.
type
=
type
;
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ProductBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getSimpleCode
());
...
...
@@ -27,6 +35,10 @@ public class StoreProductAdapter extends BaseQuickAdapter<ProductBean.RecordsBea
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
String
.
valueOf
(
item
.
getInternalPrice
())));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
addOnClickListener
(
R
.
id
.
tv_cart
);
if
(
type
==
1
)
{
helper
.
setGone
(
R
.
id
.
rl_num
,
true
);
helper
.
setText
(
R
.
id
.
tv_num
,
String
.
valueOf
(
item
.
getCanUseProductSum
()));
}
}
}
app/src/main/res/layout/activity_add_crucible.xml
0 → 100644
浏览文件 @
be28b80d
<?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"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:layout_centerInParent=
"true"
android:gravity=
"center"
android:text=
"第一步"
android:textColor=
"#ff9eaab1"
android:textSize=
"16sp"
/>
<RelativeLayout
android:id=
"@+id/rl_client"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:background=
"#ff3f617f"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"选择客户"
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_client"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:text=
"请选择客户"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/rl_stock"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:background=
"#C45D5D"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"选择代管库"
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_stock"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:text=
"请选择选择代管库"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</RelativeLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:layout_centerInParent=
"true"
android:gravity=
"center"
android:text=
"第二步"
android:textColor=
"#ff9eaab1"
android:textSize=
"16sp"
/>
<!--Product selection-->
<RelativeLayout
android:id=
"@+id/rl_product"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:background=
"#359486"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"选择产品"
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_product"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_add_crucible_pro.xml
0 → 100644
浏览文件 @
be28b80d
<?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"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<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=
"15sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_data"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_add_crucible_double.xml
0 → 100644
浏览文件 @
be28b80d
<?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"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"图号TH82739857"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_delete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:paddingHorizontal=
"5mm"
android:text=
"删除"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"14sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15mm"
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>
<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_unit"
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
android:id=
"@+id/ll_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"30mm"
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=
"17sp"
/>
<EditText
android:id=
"@+id/et_price"
android:layout_width=
"150mm"
android:layout_height=
"30mm"
android:layout_marginLeft=
"10mm"
android:background=
"@drawable/shape_add_cart"
android:gravity=
"right|center_vertical"
android:hint=
"¥0.00"
android:inputType=
"numberDecimal"
android:paddingHorizontal=
"10mm"
android:paddingVertical=
"4mm"
android:textColor=
"@color/flexible_text_sup"
android:textColorHint=
"#91ABBA"
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right|center_vertical"
android:layout_marginTop=
"25mm"
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=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduceDoubleView
android:id=
"@+id/ar_num"
android:layout_width=
"150mm"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"30mm"
>
<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:text=
"2300.00"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_store_product.xml
浏览文件 @
be28b80d
...
...
@@ -136,7 +136,30 @@
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/rl_num"
android:visibility=
"gone"
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
...
...
app/src/main/res/layout/view_add_cart_double.xml
0 → 100644
浏览文件 @
be28b80d
<?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:id=
"@+id/ll_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30mm"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"外部单价"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<EditText
android:id=
"@+id/et_price"
android:layout_width=
"match_parent"
android:layout_height=
"30mm"
android:layout_marginLeft=
"10mm"
android:background=
"@drawable/shape_add_cart"
android:gravity=
"right|center_vertical"
android:hint=
"预计开票单价"
android:inputType=
"numberDecimal"
android:paddingHorizontal=
"10mm"
android:paddingVertical=
"4mm"
android:textColor=
"@color/flexible_text_sup"
android:textColorHint=
"#91ABBA"
android:textSize=
"16sp"
/>
</LinearLayout>
<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_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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论