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
885a5e88
提交
885a5e88
authored
5月 15, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.添加接受逻辑
2.//TODO ,退件详情(top流程图,审核历史),内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级
60ce1ea2
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
511 行增加
和
17 行删除
+511
-17
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+37
-0
CrucibleOrderDetailActivity.java
...ce/ui/activity/bat/order/CrucibleOrderDetailActivity.java
+95
-2
InsideOrderDetailActivity.java
...fice/ui/activity/bat/order/InsideOrderDetailActivity.java
+93
-9
OutOrderDetailActivity.java
...koffice/ui/activity/bat/order/OutOrderDetailActivity.java
+99
-2
SaleOrderDetailActivity.java
...office/ui/activity/bat/order/SaleOrderDetailActivity.java
+95
-2
SupplierOrderDetailActivity.java
...ce/ui/activity/bat/order/SupplierOrderDetailActivity.java
+92
-2
没有找到文件。
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
885a5e88
...
@@ -1477,6 +1477,43 @@ public interface ApiService {
...
@@ -1477,6 +1477,43 @@ public interface ApiService {
@PUT
(
"/enterStoreApply/io/audit/{id}"
)
@PUT
(
"/enterStoreApply/io/audit/{id}"
)
Observable
<
BaseBean
>
addIoStockApplyCheck
(
@Path
(
"id"
)
String
id
,
@Body
RequestBody
requestBody
);
Observable
<
BaseBean
>
addIoStockApplyCheck
(
@Path
(
"id"
)
String
id
,
@Body
RequestBody
requestBody
);
/**
* step3-接单
*
* @return
*/
@PUT
(
"/insideOrder/apply/{orderId}"
)
Observable
<
BaseBean
>
insideOrderApplyCheck
(
@Path
(
"orderId"
)
String
id
,
@Body
RequestBody
requestBody
);
/**
* step3-接单
*
* @return
*/
@PUT
(
"/saleOrder/apply/{orderId}"
)
Observable
<
BaseBean
>
saleOrderApplyCheck
(
@Path
(
"orderId"
)
String
id
,
@Body
RequestBody
requestBody
);
/**
* step3-接单
*
* @return
*/
@PUT
(
"/supplierOrder/apply/{orderId}"
)
Observable
<
BaseBean
>
supplierOrderApplyCheck
(
@Path
(
"orderId"
)
String
id
,
@Body
RequestBody
requestBody
);
/**
* step3-接单
*
* @return
*/
@PUT
(
"/crucible/apply/{orderId}"
)
Observable
<
BaseBean
>
crucibleApplyCheck
(
@Path
(
"orderId"
)
String
id
,
@Body
RequestBody
requestBody
);
/**
* step3-接单
*
* @return
*/
@PUT
(
"/purchaseOrder/apply/{orderId}"
)
Observable
<
BaseBean
>
purchaseOrderApplyCheck
(
@Path
(
"orderId"
)
String
id
,
@Body
RequestBody
requestBody
);
/**
/**
* 质检申请列表
* 质检申请列表
*
*
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/CrucibleOrderDetailActivity.java
浏览文件 @
885a5e88
...
@@ -146,6 +146,12 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -146,6 +146,12 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
}
}
break
;
break
;
case
200
:
case
200
:
if
(
WorkUtils
.
orderReceivePermission
(
6
,
dataBean
.
getReceiveDeptId
())){
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
break
;
break
;
case
300
:
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
@@ -328,10 +334,18 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -328,10 +334,18 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_refuse
:
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
);
if
(
status
==
200
){
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
checkDialog
(
2
);
}
break
;
break
;
case
R
.
id
.
tv_agree
:
case
R
.
id
.
tv_agree
:
checkDialog
(
1
);
if
(
status
==
200
){
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
checkDialog
(
1
);
}
break
;
break
;
case
R
.
id
.
tv_finish_apply
:
case
R
.
id
.
tv_finish_apply
:
if
(
dataBean
==
null
)
{
if
(
dataBean
==
null
)
{
...
@@ -430,4 +444,83 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -430,4 +444,83 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
}
}
});
});
}
}
private
void
checkReceiveDialog
(
int
status
,
String
id
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
tvDesc
.
setText
(
status
==
1
?
"统一接单"
:
"拒绝接单"
);
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
etRemark
.
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
)
{
tvNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
())
&&
status
==
2
)
{
toast
(
"请填写备注"
);
return
;
}
checkReceive
(
status
,
etRemark
.
getText
().
toString
(),
id
);
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
checkReceive
(
int
status
,
String
remark
,
String
id
)
{
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"result"
,
status
);
param
.
put
(
"comment"
,
remark
);
param
.
put
(
"id"
,
id
);
RtfUtils
.
getRtf
().
crucibleApplyCheck
(
id
+
""
,
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
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
finish
();
}
});
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/InsideOrderDetailActivity.java
浏览文件 @
885a5e88
...
@@ -128,8 +128,12 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
...
@@ -128,8 +128,12 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
}
}
break
;
break
;
case
200
:
case
200
:
// llBottom.setVisibility(View.VISIBLE);
if
(
WorkUtils
.
orderReceivePermission
(
4
,
dataBean
.
getReceiveDeptId
())){
// llCheck.setVisibility(View.VISIBLE);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
break
;
break
;
case
300
:
case
300
:
break
;
break
;
...
@@ -287,10 +291,18 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
...
@@ -287,10 +291,18 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_refuse
:
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
);
if
(
status
==
200
){
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
checkDialog
(
2
);
}
break
;
break
;
case
R
.
id
.
tv_agree
:
case
R
.
id
.
tv_agree
:
checkDialog
(
1
);
if
(
status
==
200
){
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
checkDialog
(
1
);
}
break
;
break
;
case
R
.
id
.
tv_finish_apply
:
case
R
.
id
.
tv_finish_apply
:
if
(
dataBean
==
null
)
{
if
(
dataBean
==
null
)
{
...
@@ -390,10 +402,82 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
...
@@ -390,10 +402,82 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
});
});
}
}
@Override
private
void
checkReceiveDialog
(
int
status
,
String
id
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
super
.
onCreate
(
savedInstanceState
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check
,
null
);
// TODO: add setContentView(...) invocation
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
ButterKnife
.
bind
(
this
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
tvDesc
.
setText
(
status
==
1
?
"统一接单"
:
"拒绝接单"
);
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
etRemark
.
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
)
{
tvNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
())
&&
status
==
2
)
{
toast
(
"请填写备注"
);
return
;
}
checkReceive
(
status
,
etRemark
.
getText
().
toString
(),
id
);
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
checkReceive
(
int
status
,
String
remark
,
String
id
)
{
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"result"
,
status
);
param
.
put
(
"comment"
,
remark
);
param
.
put
(
"id"
,
id
);
RtfUtils
.
getRtf
().
insideOrderApplyCheck
(
id
+
""
,
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
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
finish
();
}
});
}
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/OutOrderDetailActivity.java
浏览文件 @
885a5e88
...
@@ -18,7 +18,9 @@ import com.wd.workoffice.R;
...
@@ -18,7 +18,9 @@ import com.wd.workoffice.R;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckAddStockEvent
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
...
@@ -40,6 +42,7 @@ import butterknife.BindView;
...
@@ -40,6 +42,7 @@ import butterknife.BindView;
import
butterknife.ButterKnife
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.disposables.Disposable
;
/**
/**
...
@@ -226,6 +229,12 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
...
@@ -226,6 +229,12 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
}
}
break
;
break
;
case
200
:
case
200
:
if
(
WorkUtils
.
orderReceivePermission
(
2
,
dataBean
.
getReceiveDeptId
()))
{
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
break
;
break
;
case
300
:
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
@@ -327,10 +336,18 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
...
@@ -327,10 +336,18 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
settingDialog
.
show
();
settingDialog
.
show
();
break
;
break
;
case
R
.
id
.
tv_refuse
:
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
);
if
(
status
==
200
){
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
checkDialog
(
2
);
}
break
;
break
;
case
R
.
id
.
tv_agree
:
case
R
.
id
.
tv_agree
:
checkDialog
(
1
);
if
(
status
==
200
){
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
checkDialog
(
1
);
}
break
;
break
;
case
R
.
id
.
tv_finish_apply
:
case
R
.
id
.
tv_finish_apply
:
if
(
dataBean
==
null
)
{
if
(
dataBean
==
null
)
{
...
@@ -468,4 +485,84 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
...
@@ -468,4 +485,84 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
});
});
}
}
private
void
checkReceiveDialog
(
int
status
,
String
id
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
tvDesc
.
setText
(
status
==
1
?
"统一接单"
:
"拒绝接单"
);
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
etRemark
.
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
)
{
tvNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
())
&&
status
==
2
)
{
toast
(
"请填写备注"
);
return
;
}
checkReceive
(
status
,
etRemark
.
getText
().
toString
(),
id
);
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
checkReceive
(
int
status
,
String
remark
,
String
id
)
{
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"result"
,
status
);
param
.
put
(
"comment"
,
remark
);
param
.
put
(
"id"
,
id
);
RtfUtils
.
getRtf
().
purchaseOrderApplyCheck
(
id
+
""
,
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
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
finish
();
}
});
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SaleOrderDetailActivity.java
浏览文件 @
885a5e88
...
@@ -149,6 +149,12 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -149,6 +149,12 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
}
}
break
;
break
;
case
200
:
case
200
:
if
(
WorkUtils
.
orderReceivePermission
(
1
,
dataBean
.
getReceiveDeptId
())){
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
break
;
break
;
case
300
:
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
@@ -302,10 +308,18 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -302,10 +308,18 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_refuse
:
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
);
if
(
status
==
200
){
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
checkDialog
(
2
);
}
break
;
break
;
case
R
.
id
.
tv_agree
:
case
R
.
id
.
tv_agree
:
checkDialog
(
1
);
if
(
status
==
200
){
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
checkDialog
(
1
);
}
break
;
break
;
case
R
.
id
.
tv_finish_apply
:
case
R
.
id
.
tv_finish_apply
:
if
(
dataBean
==
null
)
{
if
(
dataBean
==
null
)
{
...
@@ -405,4 +419,83 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -405,4 +419,83 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
}
}
});
});
}
}
private
void
checkReceiveDialog
(
int
status
,
String
id
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
tvDesc
.
setText
(
status
==
1
?
"统一接单"
:
"拒绝接单"
);
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
etRemark
.
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
)
{
tvNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
())
&&
status
==
2
)
{
toast
(
"请填写备注"
);
return
;
}
checkReceive
(
status
,
etRemark
.
getText
().
toString
(),
id
);
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
checkReceive
(
int
status
,
String
remark
,
String
id
)
{
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"result"
,
status
);
param
.
put
(
"comment"
,
remark
);
param
.
put
(
"id"
,
id
);
RtfUtils
.
getRtf
().
saleOrderApplyCheck
(
id
+
""
,
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
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
}
});
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SupplierOrderDetailActivity.java
浏览文件 @
885a5e88
...
@@ -141,6 +141,12 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
...
@@ -141,6 +141,12 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
}
break
;
break
;
case
200
:
case
200
:
if
(
WorkUtils
.
orderReceivePermission
(
3
,
dataBean
.
getReceiveDeptId
()))
{
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
break
;
break
;
case
300
:
case
300
:
break
;
break
;
...
@@ -302,10 +308,18 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
...
@@ -302,10 +308,18 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_refuse
:
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
);
if
(
status
==
200
){
checkReceiveDialog
(
2
,
dataBean
.
getId
());
}
else
{
checkDialog
(
2
);
}
break
;
break
;
case
R
.
id
.
tv_agree
:
case
R
.
id
.
tv_agree
:
checkDialog
(
1
);
if
(
status
==
200
){
checkReceiveDialog
(
1
,
dataBean
.
getId
());
}
else
{
checkDialog
(
1
);
}
break
;
break
;
case
R
.
id
.
tv_finish_apply
:
case
R
.
id
.
tv_finish_apply
:
if
(
dataBean
==
null
)
{
if
(
dataBean
==
null
)
{
...
@@ -405,5 +419,81 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
...
@@ -405,5 +419,81 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
}
});
});
}
}
private
void
checkReceiveDialog
(
int
status
,
String
id
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_check
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
tvDesc
.
setText
(
status
==
1
?
"统一接单"
:
"拒绝接单"
);
TextView
tvNum
=
view
.
findViewById
(
R
.
id
.
tv_num
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
EditText
etRemark
=
view
.
findViewById
(
R
.
id
.
et_content
);
etRemark
.
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
)
{
tvNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
())
&&
status
==
2
)
{
toast
(
"请填写备注"
);
return
;
}
checkReceive
(
status
,
etRemark
.
getText
().
toString
(),
id
);
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
checkReceive
(
int
status
,
String
remark
,
String
id
)
{
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"result"
,
status
);
param
.
put
(
"comment"
,
remark
);
param
.
put
(
"id"
,
id
);
RtfUtils
.
getRtf
().
supplierOrderApplyCheck
(
id
+
""
,
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
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
}
});
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论