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
a4091397
提交
a4091397
authored
5月 15, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.添加审核规则
2.//TODO ,退件详情,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级
7deef933
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
455 行增加
和
51 行删除
+455
-51
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-0
UserInfoBean.java
app/src/main/java/com/wd/workoffice/bean/UserInfoBean.java
+1
-1
CrucibleOrderDetailActivity.java
...ce/ui/activity/bat/order/CrucibleOrderDetailActivity.java
+9
-5
InsideOrderDetailActivity.java
...fice/ui/activity/bat/order/InsideOrderDetailActivity.java
+11
-2
OutOrderDetailActivity.java
...koffice/ui/activity/bat/order/OutOrderDetailActivity.java
+45
-37
ReturnApplyActivity.java
...workoffice/ui/activity/bat/order/ReturnApplyActivity.java
+1
-1
ReturnDetailActivity.java
...orkoffice/ui/activity/bat/order/ReturnDetailActivity.java
+248
-0
SaleOrderDetailActivity.java
...office/ui/activity/bat/order/SaleOrderDetailActivity.java
+6
-3
SupplierOrderDetailActivity.java
...ce/ui/activity/bat/order/SupplierOrderDetailActivity.java
+9
-2
ChooseInfoActivity.java
.../workoffice/ui/activity/bat/store/ChooseInfoActivity.java
+4
-0
UserKeeper.java
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
+12
-0
WorkUtils.java
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
+101
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
a4091397
...
@@ -1897,6 +1897,14 @@
...
@@ -1897,6 +1897,14 @@
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.order.ReturnDetailActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"退件详情"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
f
<provider
<provider
android:name=
"androidx.core.content.FileProvider"
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/bean/UserInfoBean.java
浏览文件 @
a4091397
...
@@ -63,7 +63,7 @@ public class UserInfoBean {
...
@@ -63,7 +63,7 @@ public class UserInfoBean {
private
String
erpId
;
private
String
erpId
;
private
OfDeptBean
ofDept
;
private
OfDeptBean
ofDept
;
private
String
access
;
private
String
access
;
private
String
ofDeptRuler
;
private
String
ofDeptRuler
;
//1管理员
private
Object
roleNames
;
private
Object
roleNames
;
private
String
deptName
;
private
String
deptName
;
private
Object
roleId
;
private
Object
roleId
;
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/CrucibleOrderDetailActivity.java
浏览文件 @
a4091397
...
@@ -133,15 +133,17 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -133,15 +133,17 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
}
else
{
}
else
{
}
}
// if (TextUtils.equals(identity, "1")) {//1销售 2生产
}
//
// } else {
private
void
changeView
()
{
// rlDep.setVisibility(View.GONE);
// }
switch
(
status
)
{
switch
(
status
)
{
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// { "100", "200", "710", "500","600"};
// { "100", "200", "710", "500","600"};
case
100
:
case
100
:
if
(
WorkUtils
.
orderCheckPermission
(
6
,
dataBean
.
getLaunchDeptId
())){
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
break
;
case
200
:
case
200
:
break
;
break
;
...
@@ -217,6 +219,8 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -217,6 +219,8 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
return
;
return
;
}
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
changeView
();
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowAdapter
.
notifyDataSetChanged
();
flowAdapter
.
notifyDataSetChanged
();
proList
.
addAll
(
dataBean
.
getOrderItems
());
proList
.
addAll
(
dataBean
.
getOrderItems
());
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/InsideOrderDetailActivity.java
浏览文件 @
a4091397
...
@@ -115,14 +115,21 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
...
@@ -115,14 +115,21 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
rvProcess
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
rvProcess
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
status
=
Integer
.
valueOf
(
getIntent
().
getStringExtra
(
"status"
));
status
=
Integer
.
valueOf
(
getIntent
().
getStringExtra
(
"status"
));
identity
=
getIntent
().
getStringExtra
(
"identity"
);
identity
=
getIntent
().
getStringExtra
(
"identity"
);
}
private
void
changeView
()
{
switch
(
status
)
{
switch
(
status
)
{
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// { "100", "200", "710", "500","600"};
// { "100", "200", "710", "500","600"};
case
100
:
case
100
:
if
(
WorkUtils
.
orderCheckPermission
(
4
,
dataBean
.
getLaunchDeptId
())){
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
break
;
case
200
:
case
200
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
//
llBottom.setVisibility(View.VISIBLE);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
//
llCheck.setVisibility(View.VISIBLE);
break
;
break
;
case
300
:
case
300
:
break
;
break
;
...
@@ -172,6 +179,8 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
...
@@ -172,6 +179,8 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
return
;
return
;
}
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
changeView
();
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowAdapter
.
notifyDataSetChanged
();
flowAdapter
.
notifyDataSetChanged
();
proList
.
addAll
(
dataBean
.
getOrderItems
());
proList
.
addAll
(
dataBean
.
getOrderItems
());
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/OutOrderDetailActivity.java
浏览文件 @
a4091397
...
@@ -137,43 +137,6 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
...
@@ -137,43 +137,6 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
}
else
{
}
else
{
rlDep
.
setVisibility
(
View
.
GONE
);
rlDep
.
setVisibility
(
View
.
GONE
);
}
}
switch
(
status
)
{
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// { "100", "200", "710", "500","600"};
case
100
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
200
:
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
tvSendApply
.
setVisibility
(
View
.
GONE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
410
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
500
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
600
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
default
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
tvSendApply
.
setVisibility
(
View
.
GONE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
}
settingDialog
=
DialogUtils
.
listDialog
(
this
);
settingDialog
=
DialogUtils
.
listDialog
(
this
);
settingDialog
.
addItems
(
settingList
,
(
dialog
,
which
)
->
{
settingDialog
.
addItems
(
settingList
,
(
dialog
,
which
)
->
{
tvSet
.
setText
(
settingList
[
which
]);
tvSet
.
setText
(
settingList
[
which
]);
...
@@ -217,6 +180,9 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
...
@@ -217,6 +180,9 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
return
;
return
;
}
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
changeView
();
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowAdapter
.
notifyDataSetChanged
();
flowAdapter
.
notifyDataSetChanged
();
proList
.
addAll
(
dataBean
.
getOrderItems
());
proList
.
addAll
(
dataBean
.
getOrderItems
());
...
@@ -249,6 +215,48 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
...
@@ -249,6 +215,48 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
});
});
}
}
private
void
changeView
()
{
switch
(
status
)
{
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// { "100", "200", "710", "500","600"};
case
100
:
if
(
WorkUtils
.
orderCheckPermission
(
2
,
dataBean
.
getLaunchDeptId
()))
{
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
case
200
:
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
tvSendApply
.
setVisibility
(
View
.
GONE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
410
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
500
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
case
600
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
default
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
tvSendApply
.
setVisibility
(
View
.
GONE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
break
;
}
}
@Override
@Override
protected
void
initEvent
()
{
protected
void
initEvent
()
{
proAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
proAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnApplyActivity.java
浏览文件 @
a4091397
...
@@ -140,7 +140,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
...
@@ -140,7 +140,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
dataAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
dataAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
startActivity
(
EndApply
DetailActivity
.
class
,
startActivity
(
Return
DetailActivity
.
class
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)));
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)));
}
}
});
});
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnDetailActivity.java
0 → 100644
浏览文件 @
a4091397
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.AddStockBean
;
import
com.wd.workoffice.bean.ReturnApplyBean
;
import
com.wd.workoffice.bean.event.CheckAddStockEvent
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.Map
;
import
androidx.appcompat.app.AlertDialog
;
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
ReturnDetailActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_status
)
TextView
tvStatus
;
@BindView
(
R
.
id
.
ll_top
)
RelativeLayout
llTop
;
@BindView
(
R
.
id
.
tv_refuse
)
TextView
tvRefuse
;
@BindView
(
R
.
id
.
tv_agree
)
TextView
tvAgree
;
@BindView
(
R
.
id
.
ll_check
)
LinearLayout
llCheck
;
@BindView
(
R
.
id
.
tv_finish_apply
)
TextView
tvFinishApply
;
@BindView
(
R
.
id
.
tv_send_apply
)
TextView
tvSendApply
;
@BindView
(
R
.
id
.
ll_apply
)
LinearLayout
llApply
;
@BindView
(
R
.
id
.
ll_bottom
)
LinearLayout
llBottom
;
@BindView
(
R
.
id
.
rv_process
)
RecyclerView
rvProcess
;
@BindView
(
R
.
id
.
rl_history
)
RelativeLayout
rlHistory
;
@BindView
(
R
.
id
.
tv_name
)
TextView
tvName
;
@BindView
(
R
.
id
.
tv_pro_code
)
TextView
tvProCode
;
@BindView
(
R
.
id
.
tv_pro_name
)
TextView
tvProName
;
@BindView
(
R
.
id
.
tv_return_num
)
TextView
tvReturnNum
;
@BindView
(
R
.
id
.
tv_return_type
)
TextView
tvReturnType
;
@BindView
(
R
.
id
.
tv_stock
)
TextView
tvStock
;
@BindView
(
R
.
id
.
tv_person
)
TextView
tvPerson
;
@BindView
(
R
.
id
.
tv_time
)
TextView
tvTime
;
@BindView
(
R
.
id
.
tv_remark
)
TextView
tvRemark
;
@BindView
(
R
.
id
.
rl_order
)
RelativeLayout
rlOrder
;
private
ReturnApplyBean
.
RecordsBean
info
;
private
String
orderType
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
}
@Override
protected
void
initData
()
{
info
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"info"
),
ReturnApplyBean
.
RecordsBean
.
class
);
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
tvNum
.
setText
(
String
.
valueOf
(
info
.
getProductAmount
()));
tvBoxNum
.
setText
(
String
.
valueOf
(
info
.
getBoxCode
()));
tvPerson
.
setText
(
String
.
valueOf
(
info
.
getCreatedByName
()));
tvTime
.
setText
(
info
.
getCreatedTime
());
tvRemark
.
setText
(
String
.
valueOf
(
info
.
getApplyRemark
()));
if
(
TextUtils
.
equals
(
info
.
getQualityInspectionStatus
(),
"0"
))
{
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
changePermission
();
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvCheckPerson
.
setText
(
info
.
getUpdatedByName
());
tvCheckTime
.
setText
(
info
.
getUpdatedTime
());
tvCheckRemark
.
setText
(
info
.
getAuditRemark
());
tvCheckStatus
.
setText
(
WorkUtils
.
getFinancialStatus
(
Integer
.
valueOf
(
info
.
getQualityInspectionStatus
())));
}
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_bat_retrun_detail
;
}
@OnClick
({
R
.
id
.
tv_refuse
,
R
.
id
.
tv_agree
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
,
info
.
getId
());
break
;
case
R
.
id
.
tv_agree
:
checkDialog
(
1
,
info
.
getId
());
break
;
}
}
private
void
changePermission
()
{
boolean
hasPermission
=
true
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
hasPermission
=
WorkUtils
.
hasPermission
(
PagePermissionType
.
SO_OUT_AUDIT
.
getPermission
());
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
hasPermission
=
WorkUtils
.
hasPermission
(
PagePermissionType
.
SO_OUT_AUDIT
.
getPermission
());
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
hasPermission
=
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_QUALITY_AUDIT
.
getPermission
());
}
if
(!
hasPermission
)
{
tvRefuse
.
setVisibility
(
View
.
GONE
);
tvAgree
.
setVisibility
(
View
.
GONE
);
}
}
private
void
checkDialog
(
int
status
,
int
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
;
}
check
(
status
,
etRemark
.
getText
().
toString
(),
id
);
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
check
(
int
status
,
String
remark
,
int
id
)
{
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"result"
,
status
);
param
.
put
(
"comment"
,
remark
);
param
.
put
(
"id"
,
id
);
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
enterFoStoreApplyList
(
id
+
""
,
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
observable
=
RtfUtils
.
getRtf
().
enterFoStoreApplyList
(
id
+
""
,
WorkUtils
.
convertMapToBody
(
param
));
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
toast
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckAddStockEvent
());
finish
();
}
});
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SaleOrderDetailActivity.java
浏览文件 @
a4091397
...
@@ -130,7 +130,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -130,7 +130,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
}
}
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"status"
)))
{
if
(!
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"status"
)))
{
status
=
Integer
.
valueOf
(
getIntent
().
getStringExtra
(
"status"
));
status
=
Integer
.
valueOf
(
getIntent
().
getStringExtra
(
"status"
));
changView
(
status
);
//
changView(status);
}
}
}
}
...
@@ -143,8 +143,10 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -143,8 +143,10 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
// "", "100", "200", "710", "500",
// "", "100", "200", "710", "500",
// "600"};
// "600"};
case
100
:
case
100
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
if
(
WorkUtils
.
orderCheckPermission
(
1
,
dataBean
.
getLaunchDeptId
())){
llCheck
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
break
;
case
200
:
case
200
:
break
;
break
;
...
@@ -231,6 +233,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -231,6 +233,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
tvDesc
.
setText
(
dataBean
.
getAttrName
());
tvDesc
.
setText
(
dataBean
.
getAttrName
());
tvStatus
.
setText
(
dataBean
.
getStatusName
());
tvStatus
.
setText
(
dataBean
.
getStatusName
());
status
=
dataBean
.
getStatus
();
changView
(
dataBean
.
getStatus
());
changView
(
dataBean
.
getStatus
());
}
}
});
});
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SupplierOrderDetailActivity.java
浏览文件 @
a4091397
...
@@ -128,12 +128,17 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
...
@@ -128,12 +128,17 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
else
{
}
else
{
rlDep
.
setVisibility
(
View
.
GONE
);
rlDep
.
setVisibility
(
View
.
GONE
);
}
}
}
private
void
changeView
()
{
switch
(
status
)
{
switch
(
status
)
{
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// {"待审核", "待接单", "待生产", "已入库","已交付"};
// { "100", "200", "710", "500","600"};
// { "100", "200", "710", "500","600"};
case
100
:
case
100
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
if
(
WorkUtils
.
orderCheckPermission
(
3
,
dataBean
.
getLaunchDeptId
())){
llCheck
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
break
;
case
200
:
case
200
:
break
;
break
;
...
@@ -188,6 +193,8 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
...
@@ -188,6 +193,8 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
return
;
return
;
}
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
changeView
();
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowList
.
addAll
(
dataBean
.
getOrderFlows
());
flowAdapter
.
notifyDataSetChanged
();
flowAdapter
.
notifyDataSetChanged
();
proList
.
addAll
(
dataBean
.
getOrderItems
());
proList
.
addAll
(
dataBean
.
getOrderItems
());
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/ChooseInfoActivity.java
浏览文件 @
a4091397
...
@@ -228,6 +228,10 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
...
@@ -228,6 +228,10 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
switch
(
item
.
getItemId
())
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
cart
:
case
R
.
id
.
cart
:
if
(
TextUtils
.
equals
(
"6"
,
type
))
{
if
(
TextUtils
.
equals
(
"6"
,
type
))
{
if
(
chooseStock
==
null
)
{
toast
(
"请选择入库仓库"
);
return
super
.
onOptionsItemSelected
(
item
);
}
if
(!
carMap
.
containsKey
(
"pro"
))
{
if
(!
carMap
.
containsKey
(
"pro"
))
{
toast
(
"购物车没有产品"
);
toast
(
"购物车没有产品"
);
return
super
.
onOptionsItemSelected
(
item
);
return
super
.
onOptionsItemSelected
(
item
);
...
...
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
浏览文件 @
a4091397
...
@@ -170,6 +170,18 @@ public class UserKeeper {
...
@@ -170,6 +170,18 @@ public class UserKeeper {
return
infoBean
.
getOfDept
().
getId
()
+
""
;
return
infoBean
.
getOfDept
().
getId
()
+
""
;
}
}
public
String
getUserDepRuler
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
return
""
;
}
UserInfoBean
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
USER_INFO
),
UserInfoBean
.
class
);
if
(
infoBean
==
null
)
{
return
""
;
}
return
infoBean
.
getOfDeptRuler
();
}
public
String
getUserDepName
()
{
public
String
getUserDepName
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
return
""
;
return
""
;
...
...
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
浏览文件 @
a4091397
...
@@ -20,6 +20,7 @@ import com.wd.workoffice.app.Config;
...
@@ -20,6 +20,7 @@ import com.wd.workoffice.app.Config;
import
com.wd.workoffice.app.WorkApp
;
import
com.wd.workoffice.app.WorkApp
;
import
com.wd.workoffice.bean.event.RefreshTokenEvent
;
import
com.wd.workoffice.bean.event.RefreshTokenEvent
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.retrofit.ApiService
;
import
com.wd.workoffice.retrofit.ApiService
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
...
@@ -247,6 +248,7 @@ public class WorkUtils {
...
@@ -247,6 +248,7 @@ public class WorkUtils {
/**
/**
* 0-待审核,1-审核正常,2-审核数据有误
* 0-待审核,1-审核正常,2-审核数据有误
*
* @param status
* @param status
* @return
* @return
*/
*/
...
@@ -308,6 +310,105 @@ public class WorkUtils {
...
@@ -308,6 +310,105 @@ public class WorkUtils {
return
name
;
return
name
;
}
}
/**
* 判断是否有审核权限
*
* @param type 依照界面顺序
* @param deptId
* @return
*/
public
static
Boolean
orderCheckPermission
(
int
type
,
int
deptId
)
{
switch
(
type
)
{
case
1
:
if
(!
hasPermission
(
PagePermissionType
.
SALE_ORDER_AUDIT
.
getPermission
()))
{
return
false
;
}
break
;
case
2
:
if
(!
hasPermission
(
PagePermissionType
.
PO_PURCHASE_AUDIT
.
getPermission
()))
{
return
false
;
}
break
;
case
3
:
if
(!
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_AUDIT
.
getPermission
()))
{
return
false
;
}
break
;
case
4
:
if
(!
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_AUDIT
.
getPermission
()))
{
return
false
;
}
break
;
case
5
:
if
(!
hasPermission
(
PagePermissionType
.
AO_PACKAGE_APPLY_AUDIT
.
getPermission
()))
{
return
false
;
}
break
;
case
6
:
if
(!
hasPermission
(
PagePermissionType
.
IO_INSIDE_AUDIT
.
getPermission
()))
{
return
false
;
}
break
;
}
if
(!
TextUtils
.
equals
(
UserKeeper
.
getInstance
().
getUserDepId
(),
deptId
+
""
))
{
return
false
;
}
if
(!
TextUtils
.
equals
(
UserKeeper
.
getInstance
().
getUserDepRuler
(),
"1"
))
{
return
false
;
}
return
true
;
}
/**
* 判断是否有审核权限
*
* @param type 依照界面顺序
* @param deptId
* @return
*/
public
static
Boolean
orderReceivePermission
(
int
type
,
int
deptId
)
{
switch
(
type
)
{
case
1
:
if
(!
hasPermission
(
PagePermissionType
.
SALE_ORDER_APPLY
.
getPermission
()))
{
return
false
;
}
break
;
case
2
:
if
(!
hasPermission
(
PagePermissionType
.
PO_PURCHASE_APPLY
.
getPermission
()))
{
return
false
;
}
break
;
case
3
:
if
(!
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_APPLY
.
getPermission
()))
{
return
false
;
}
break
;
case
4
:
if
(!
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_APPLY
.
getPermission
()))
{
return
false
;
}
break
;
case
5
:
// if (!hasPermission(PagePermissionType.AO_PACKAGE_APPLY_AUDIT.getPermission())) {
// return false;
// }
break
;
case
6
:
if
(!
hasPermission
(
PagePermissionType
.
IO_INSIDE_APPLY
.
getPermission
()))
{
return
false
;
}
break
;
}
if
(!
TextUtils
.
equals
(
UserKeeper
.
getInstance
().
getUserDepId
(),
deptId
+
""
))
{
return
false
;
}
if
(!
TextUtils
.
equals
(
UserKeeper
.
getInstance
().
getUserDepRuler
(),
"1"
))
{
return
false
;
}
return
true
;
}
/**
/**
* 刷新token
* 刷新token
*
*
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论