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
4d0224c9
提交
4d0224c9
authored
8月 09, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.坩埚销售发货
2.TODO 供应订单三个功能测试,
上级
356f0bb3
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
79 行增加
和
20 行删除
+79
-20
AddStockChooseBean.java
.../main/java/com/wd/workoffice/bean/AddStockChooseBean.java
+27
-0
SendApplyAddActivity.java
...orkoffice/ui/activity/bat/order/SendApplyAddActivity.java
+4
-4
SendApplyAddCrucibleActivity.java
...e/ui/activity/bat/order/SendApplyAddCrucibleActivity.java
+20
-10
SendApplyCrucibleChooseActivity.java
...i/activity/bat/order/SendApplyCrucibleChooseActivity.java
+23
-2
SendApplyAddCrucibleAdapter.java
...wd/workoffice/ui/adapter/SendApplyAddCrucibleAdapter.java
+3
-4
activity_send_apply_add.xml
app/src/main/res/layout/activity_send_apply_add.xml
+1
-0
activity_send_apply_detail.xml
app/src/main/res/layout/activity_send_apply_detail.xml
+1
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/AddStockChooseBean.java
浏览文件 @
4d0224c9
...
...
@@ -130,6 +130,33 @@ public class AddStockChooseBean {
private
Object
deptId
;
private
double
actionQuantity
;
private
String
chooseNum
;
private
String
orderType
;
private
String
orderId
;
private
String
fromStockId
;
public
String
getFromStockId
()
{
return
fromStockId
;
}
public
void
setFromStockId
(
String
fromStockId
)
{
this
.
fromStockId
=
fromStockId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
String
getOrderType
()
{
return
orderType
;
}
public
void
setOrderType
(
String
orderType
)
{
this
.
orderType
=
orderType
;
}
public
String
getChooseNum
()
{
return
chooseNum
;
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SendApplyAddActivity.java
浏览文件 @
4d0224c9
...
...
@@ -199,10 +199,10 @@ public class SendApplyAddActivity extends WorkToolBarActivity {
String
code
=
etLogisticsCode
.
getText
().
toString
();
String
remark
=
etRemark
.
getText
().
toString
();
String
time
=
tvTime
.
getText
().
toString
();
if
(
TextUtils
.
isEmpty
(
time
))
{
toast
(
"请选择发货时间"
);
return
;
}
//
if (TextUtils.isEmpty(time)) {
//
toast("请选择发货时间");
//
return;
//
}
if
(
TextUtils
.
isEmpty
(
price
))
{
toast
(
"请输入运费"
);
return
;
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SendApplyAddCrucibleActivity.java
浏览文件 @
4d0224c9
...
...
@@ -11,6 +11,7 @@ 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.google.gson.JsonObject
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
...
...
@@ -109,9 +110,10 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
baseQuickAdapter
,
View
view
,
int
i
)
{
startActivityForResult
(
SendApplyCrucibleChooseActivity
.
class
,
10002
,
"position"
,
i
+
""
,
"deptId"
,
getIntent
().
getStringExtra
(
"deptId"
),
"productId"
,
dataList
.
get
(
i
).
getProductId
()+
""
);
10002
,
"position"
,
i
+
""
,
"deptId"
,
getIntent
().
getStringExtra
(
"deptId"
),
"num"
,
MathUtils
.
converData
(
dataList
.
get
(
i
).
getCanOutStoreProductSum
(),
3
)
,
"productId"
,
dataList
.
get
(
i
).
getProductId
()
+
""
);
}
});
}
...
...
@@ -182,7 +184,7 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
if
(
entry
.
getValue
())
{
OrderDetail
.
OrderItemsBean
recordsBean
=
dataList
.
get
(
entry
.
getKey
());
JSONObject
returnData
=
new
JSONObject
();
if
(
null
==
recordsBean
.
getBackList
())
{
if
(
null
==
recordsBean
.
getBackList
())
{
toast
(
"请选择来源"
);
return
false
;
}
...
...
@@ -196,7 +198,11 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
returnData
.
put
(
"productAmount"
,
recordsBean
.
getCount
());
for
(
AddStockChooseBean
.
RecordsBean
bean
:
recordsBean
.
getBackList
())
{
bean
.
setActionQuantity
(
Double
.
valueOf
(
bean
.
getChooseNum
()));
bean
.
setOrderId
(
getIntent
().
getStringExtra
(
"id"
));
bean
.
setOrderType
(
orderType
);
bean
.
setFromStockId
(
bean
.
getStockId
()
+
""
);
}
returnData
.
put
(
"stockFromDetails"
,
recordsBean
.
getBackList
());
info
.
add
(
returnData
);
}
...
...
@@ -239,7 +245,7 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
sendForwardApply
(
getIntent
().
getStringExtra
(
"id"
),
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
}
else
{
observable
=
RtfUtils
.
getRtf
().
sendForwardApply
(
getIntent
().
getStringExtra
(
"id"
),
WorkUtils
.
convertMapToBody
(
param
));
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
...
...
@@ -298,8 +304,9 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
tvLogisticsCompany
.
setText
(
clientName
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
10002
){
List
<
AddStockChooseBean
.
RecordsBean
>
backList
=
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"stock"
),
AddStockChooseBean
.
RecordsBean
.
class
);
}
else
if
(
requestCode
==
10002
&&
resultCode
==
10002
)
{
List
<
AddStockChooseBean
.
RecordsBean
>
backList
=
JSON
.
parseArray
(
data
.
getStringExtra
(
"stock"
),
AddStockChooseBean
.
RecordsBean
.
class
);
Integer
position
=
Integer
.
valueOf
(
data
.
getStringExtra
(
"position"
));
String
count
=
data
.
getStringExtra
(
"count"
);
dataList
.
get
(
position
).
setBackList
(
backList
);
...
...
@@ -322,7 +329,6 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
@Subscribe
public
void
refresh
(
SendWeightEvent
event
)
{
Map
<
Integer
,
Boolean
>
isChoose
=
dataAdapter
.
getIsChoose
();
List
<
JSONObject
>
info
=
new
ArrayList
<>();
String
totalWeight
=
"0"
;
...
...
@@ -332,10 +338,14 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
JSONObject
returnData
=
new
JSONObject
();
if
(
TextUtils
.
isEmpty
(
recordsBean
.
getChooseNum
())
||
Double
.
valueOf
(
recordsBean
.
getChooseNum
())
==
0
d
)
{
}
totalWeight
=
MathUtils
.
add
(
totalWeight
,
MathUtils
.
multiply
(
recordsBean
.
getC
hooseNum
(),
totalWeight
=
MathUtils
.
add
(
totalWeight
,
MathUtils
.
multiply
(
recordsBean
.
getC
ount
(),
String
.
valueOf
(
recordsBean
.
getProductWeight
()),
3
),
3
);
returnData
.
put
(
"productId"
,
recordsBean
.
getProductId
());
returnData
.
put
(
"productAmount"
,
recordsBean
.
getChooseNum
());
returnData
.
put
(
"productAmount"
,
recordsBean
.
getCount
());
for
(
AddStockChooseBean
.
RecordsBean
bean
:
recordsBean
.
getBackList
())
{
bean
.
setActionQuantity
(
Double
.
valueOf
(
bean
.
getChooseNum
()));
}
returnData
.
put
(
"stockFromDetails"
,
recordsBean
.
getBackList
());
info
.
add
(
returnData
);
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SendApplyCrucibleChooseActivity.java
浏览文件 @
4d0224c9
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
...
...
@@ -15,7 +19,6 @@ import com.wd.workoffice.bean.AddStockChooseBean;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.AddStockCrucibleChooseAdapter
;
import
com.wd.workoffice.ui.adapter.SendApplyCrucibleChooseAdapter
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
...
...
@@ -24,6 +27,7 @@ import org.greenrobot.eventbus.EventBus;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -52,6 +56,16 @@ public class SendApplyCrucibleChooseActivity extends WorkToolBarActivity {
RelativeLayout
llBottom
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
@BindView
(
R
.
id
.
et_key
)
EditText
etKey
;
@BindView
(
R
.
id
.
btn_search
)
Button
btnSearch
;
@BindView
(
R
.
id
.
ll_search
)
LinearLayout
llSearch
;
@BindView
(
R
.
id
.
tv_count_desc
)
TextView
tvCountDesc
;
@BindView
(
R
.
id
.
ll_title
)
LinearLayout
llTitle
;
private
List
<
AddStockChooseBean
.
RecordsBean
>
productList
;
private
SendApplyCrucibleChooseAdapter
productAdapter
;
private
int
page
=
1
;
...
...
@@ -61,6 +75,7 @@ public class SendApplyCrucibleChooseActivity extends WorkToolBarActivity {
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
tvCountDesc
.
setText
(
String
.
format
(
"(可申请数量%s)"
,
getIntent
().
getStringExtra
(
"num"
)));
}
@Override
...
...
@@ -125,7 +140,7 @@ public class SendApplyCrucibleChooseActivity extends WorkToolBarActivity {
if
(
entry
.
getValue
())
{
isHas
=
true
;
backList
.
add
(
productList
.
get
(
entry
.
getKey
()));
if
(
TextUtils
.
isEmpty
(
productList
.
get
(
entry
.
getKey
()).
getChooseNum
())||
if
(
TextUtils
.
isEmpty
(
productList
.
get
(
entry
.
getKey
()).
getChooseNum
())
||
TextUtils
.
equals
(
productList
.
get
(
entry
.
getKey
()).
getChooseNum
(),
"0"
))
{
toast
(
"请输入数量"
);
return
;
...
...
@@ -133,6 +148,11 @@ public class SendApplyCrucibleChooseActivity extends WorkToolBarActivity {
}
}
if
(
isHas
)
{
if
(
new
BigDecimal
(
Double
.
valueOf
(
tvPrice
.
getText
().
toString
().
split
(
": "
)[
1
])).
compareTo
(
new
BigDecimal
(
getIntent
().
getStringExtra
(
"num"
)))
==
1
)
{
toast
(
String
.
format
(
"可申请数量最大为%s"
,
MathUtils
.
converData
(
getIntent
().
getStringExtra
(
"num"
),
3
)));
return
;
}
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"stock"
,
JSON
.
toJSONString
(
backList
));
intent
.
putExtra
(
"position"
,
getIntent
().
getStringExtra
(
"position"
));
...
...
@@ -214,6 +234,7 @@ public class SendApplyCrucibleChooseActivity extends WorkToolBarActivity {
}
});
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
menu_finish
,
menu
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/SendApplyAddCrucibleAdapter.java
浏览文件 @
4d0224c9
...
...
@@ -29,15 +29,14 @@ public class SendApplyAddCrucibleAdapter extends BaseQuickAdapter<OrderDetail.Or
public
SendApplyAddCrucibleAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
for
(
int
i
=
0
;
i
<
isChoose
.
entrySet
()
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
data
.
size
();
i
++)
{
isChoose
.
put
(
i
,
false
);
}
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderDetail
.
OrderItemsBean
item
)
{
if
(!
TextUtils
.
isEmpty
(
item
.
getCount
())){
if
(!
TextUtils
.
isEmpty
(
item
.
getCount
()))
{
helper
.
setText
(
R
.
id
.
tv_from
,
item
.
getCount
());
}
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductSimpleCode
());
...
...
@@ -52,11 +51,11 @@ public class SendApplyAddCrucibleAdapter extends BaseQuickAdapter<OrderDetail.Or
helper
.
setText
(
R
.
id
.
tv_apply_send_num
,
MathUtils
.
converData
(
item
.
getCanOutStoreProductSum
(),
3
));
helper
.
setText
(
R
.
id
.
tv_send_num
,
MathUtils
.
converData
(
item
.
getShipSum
(),
3
));
CheckBox
cbChoose
=
helper
.
getView
(
R
.
id
.
cb_check
);
cbChoose
.
setChecked
(
isChoose
.
get
(
helper
.
getAdapterPosition
())
==
null
?
false
:
isChoose
.
get
(
helper
.
getAdapterPosition
()));
cbChoose
.
setOnCheckedChangeListener
(
new
CompoundButton
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
isChoose
.
put
(
helper
.
getAdapterPosition
(),
cbChoose
.
isChecked
());
EventBus
.
getDefault
().
post
(
new
SendWeightEvent
());
}
});
...
...
app/src/main/res/layout/activity_send_apply_add.xml
浏览文件 @
4d0224c9
...
...
@@ -76,6 +76,7 @@
</LinearLayout>
<RelativeLayout
android:visibility=
"gone"
android:id=
"@+id/rl_time"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/activity_send_apply_detail.xml
浏览文件 @
4d0224c9
...
...
@@ -95,6 +95,7 @@
</LinearLayout>
<RelativeLayout
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论