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
8c63faeb
提交
8c63faeb
authored
5月 18, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.退件历史
2.//TODO 设备三个子菜单,退件详情(审核历史(缺接口)),领用申请列表(数据不对),坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级
bb82ca73
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
178 行增加
和
59 行删除
+178
-59
ReturnHistoryBean.java
...c/main/java/com/wd/workoffice/bean/ReturnHistoryBean.java
+126
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+8
-0
ReturnApplyHistoryActivity.java
...ice/ui/activity/bat/order/ReturnApplyHistoryActivity.java
+6
-50
ReturnDetailActivity.java
...orkoffice/ui/activity/bat/order/ReturnDetailActivity.java
+1
-0
ReturnHistoryAdapter.java
...va/com/wd/workoffice/ui/adapter/ReturnHistoryAdapter.java
+37
-8
item_return_history.xml
app/src/main/res/layout/item_return_history.xml
+0
-1
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/ReturnHistoryBean.java
0 → 100644
浏览文件 @
8c63faeb
package
com
.
wd
.
workoffice
.
bean
;
import
java.util.List
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ReturnHistoryBean
{
/**
* createdBy : 111
* createdByName : 冯帆
* createdTime : null
* updatedBy : 711
* updatedByName : 邓龙辉
* updatedTime : 2020-05-16 21:18:24
* id : 71
* returnApplyId : 114
* status : 14
* applyRemark : E
* auditRemark :
*/
private
int
createdBy
;
private
String
createdByName
;
private
String
createdTime
;
private
int
updatedBy
;
private
String
updatedByName
;
private
String
updatedTime
;
private
int
id
;
private
int
returnApplyId
;
private
String
status
;
private
String
applyRemark
;
private
String
auditRemark
;
public
int
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
int
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
String
getCreatedByName
()
{
return
createdByName
;
}
public
void
setCreatedByName
(
String
createdByName
)
{
this
.
createdByName
=
createdByName
;
}
public
String
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
int
getUpdatedBy
()
{
return
updatedBy
;
}
public
void
setUpdatedBy
(
int
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
public
String
getUpdatedByName
()
{
return
updatedByName
;
}
public
void
setUpdatedByName
(
String
updatedByName
)
{
this
.
updatedByName
=
updatedByName
;
}
public
String
getUpdatedTime
()
{
return
updatedTime
;
}
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getReturnApplyId
()
{
return
returnApplyId
;
}
public
void
setReturnApplyId
(
int
returnApplyId
)
{
this
.
returnApplyId
=
returnApplyId
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getApplyRemark
()
{
return
applyRemark
;
}
public
void
setApplyRemark
(
String
applyRemark
)
{
this
.
applyRemark
=
applyRemark
;
}
public
String
getAuditRemark
()
{
return
auditRemark
;
}
public
void
setAuditRemark
(
String
auditRemark
)
{
this
.
auditRemark
=
auditRemark
;
}
}
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
8c63faeb
...
...
@@ -1366,6 +1366,14 @@ public interface ApiService {
@GET
(
"/returnApply/po/page/list"
)
Observable
<
BaseBean
>
returnPoApplyList
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 审核历史
*
* @return
*/
@GET
(
"/returnApplyFlow/list"
)
Observable
<
BaseBean
>
returnFlowList
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* step4_1-发起入库申请
*
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnApplyHistoryActivity.java
浏览文件 @
8c63faeb
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -12,10 +11,9 @@ import com.wd.workoffice.R;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ReturnApplyBean
;
import
com.wd.workoffice.bean.
workEnum.OrderType
;
import
com.wd.workoffice.bean.
ReturnHistoryBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.RetrunSendApplyAdapter
;
import
com.wd.workoffice.ui.adapter.ReturnHistoryAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
...
...
@@ -29,7 +27,6 @@ import androidx.recyclerview.widget.RecyclerView;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
/**
...
...
@@ -45,10 +42,8 @@ public class ReturnApplyHistoryActivity extends WorkToolBarActivity {
@BindView
(
R
.
id
.
srl_refresh
)
SmartRefreshLayout
srlRefresh
;
private
Map
<
String
,
Object
>
param
;
private
List
<
Return
ApplyBean
.
Records
Bean
>
dataList
;
private
List
<
Return
History
Bean
>
dataList
;
private
ReturnHistoryAdapter
dataAdapter
;
private
int
page
=
1
;
private
String
orderType
;
@Override
protected
void
initView
()
{
...
...
@@ -59,29 +54,17 @@ public class ReturnApplyHistoryActivity extends WorkToolBarActivity {
@Override
protected
void
initData
()
{
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
ReturnHistoryAdapter
(
R
.
layout
.
item_return_history
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvData
);
param
=
WorkUtils
.
pageKey
();
page
=
1
;
param
.
put
(
"current"
,
page
);
param
.
put
(
"orderId"
,
getIntent
().
getStringExtra
(
"orderId"
));
param
.
put
(
"productId"
,
getIntent
().
getStringExtra
(
"productId"
));
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"returnApplyId"
,
getIntent
().
getStringExtra
(
"id"
));
getData
();
}
private
void
getData
()
{
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
returnApplyList
(
param
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
returnPoApplyList
(
param
);
}
else
{
observable
=
RtfUtils
.
getRtf
().
returnApplyList
(
param
);
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
RtfUtils
.
getRtf
().
returnFlowList
(
param
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
...
...
@@ -99,23 +82,11 @@ public class ReturnApplyHistoryActivity extends WorkToolBarActivity {
toast
(
data
.
getMessage
());
return
;
}
List
<
ReturnApplyBean
.
RecordsBean
>
getList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
ReturnApplyBean
.
class
).
getRecords
();
if
(
page
==
1
)
{
List
<
ReturnHistoryBean
>
getList
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
ReturnHistoryBean
.
class
);
srlRefresh
.
finishRefresh
();
dataList
.
clear
();
dataList
.
addAll
(
getList
);
dataAdapter
.
notifyDataSetChanged
();
dataAdapter
.
loadMoreComplete
();
}
else
{
dataAdapter
.
loadMoreComplete
();
dataList
.
addAll
(
getList
);
dataAdapter
.
notifyDataSetChanged
();
}
if
(
getList
.
size
()
==
0
)
{
dataAdapter
.
loadMoreEnd
();
}
else
{
page
++;
}
}
});
}
...
...
@@ -126,27 +97,12 @@ public class ReturnApplyHistoryActivity extends WorkToolBarActivity {
srlRefresh
.
setOnRefreshListener
(
new
OnRefreshListener
()
{
@Override
public
void
onRefresh
(
@NonNull
RefreshLayout
refreshLayout
)
{
page
=
1
;
param
.
put
(
"current"
,
page
);
getData
();
}
});
dataAdapter
.
setOnLoadMoreListener
(
new
BaseQuickAdapter
.
RequestLoadMoreListener
()
{
@Override
public
void
onLoadMoreRequested
()
{
param
.
put
(
"current"
,
page
);
getData
();
}
},
rvData
);
dataAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
startActivity
(
ReturnDetailActivity
.
class
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)),
"orderType"
,
orderType
,
"status"
,
getIntent
().
getStringExtra
(
"status"
)
,
"id"
,
getIntent
().
getStringExtra
(
"orderId"
)
,
"identity"
,
getIntent
().
getStringExtra
(
"identity"
));
}
});
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnDetailActivity.java
浏览文件 @
8c63faeb
...
...
@@ -430,6 +430,7 @@ public class ReturnDetailActivity extends WorkToolBarActivity {
checkDialog
(
1
,
info
.
getId
());
break
;
case
R
.
id
.
rl_history
:
startActivity
(
ReturnApplyHistoryActivity
.
class
,
"id"
,
info
.
getId
()+
""
);
break
;
case
R
.
id
.
rl_order
:
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/ReturnHistoryAdapter.java
浏览文件 @
8c63faeb
...
...
@@ -2,12 +2,14 @@ package com.wd.workoffice.ui.adapter;
import
android.graphics.Color
;
import
android.text.TextUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.ReturnApplyBean
;
import
com.wd.workoffice.bean.ReturnHistoryBean
;
import
java.util.List
;
...
...
@@ -17,33 +19,60 @@ import androidx.annotation.Nullable;
* Created by flexible on 2018/8/13.
*/
public
class
ReturnHistoryAdapter
extends
BaseQuickAdapter
<
Return
ApplyBean
.
Records
Bean
,
BaseViewHolder
>
{
public
class
ReturnHistoryAdapter
extends
BaseQuickAdapter
<
Return
History
Bean
,
BaseViewHolder
>
{
public
ReturnHistoryAdapter
(
int
layoutResId
,
@Nullable
List
<
Return
ApplyBean
.
Records
Bean
>
data
)
{
public
ReturnHistoryAdapter
(
int
layoutResId
,
@Nullable
List
<
Return
History
Bean
>
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
Return
ApplyBean
.
Records
Bean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
Return
History
Bean
item
)
{
if
(
helper
.
getAdapterPosition
()
==
0
)
{
helper
.
setTextColor
(
R
.
id
.
tv_
status
,
Color
.
parseColor
(
"#ff359486"
));
helper
.
setTextColor
(
R
.
id
.
tv_
desc
,
Color
.
parseColor
(
"#ff359486"
));
helper
.
setTextColor
(
R
.
id
.
tv_time
,
Color
.
parseColor
(
"#ff359486"
));
helper
.
setTextColor
(
R
.
id
.
tv_remark
,
Color
.
parseColor
(
"#ff359486"
));
helper
.
setBackgroundRes
(
R
.
id
.
tv_dep
,
R
.
drawable
.
shape_green_btn
);
helper
.
setGone
(
R
.
id
.
iv_last
,
true
);
helper
.
setGone
(
R
.
id
.
iv_simple
,
false
);
}
else
{
helper
.
setTextColor
(
R
.
id
.
tv_
status
,
helper
.
getConvertView
().
getResources
().
getColor
(
R
.
color
.
flexible_text_gray
));
helper
.
setTextColor
(
R
.
id
.
tv_
desc
,
helper
.
getConvertView
().
getResources
().
getColor
(
R
.
color
.
flexible_text_gray
));
helper
.
setTextColor
(
R
.
id
.
tv_time
,
helper
.
getConvertView
().
getResources
().
getColor
(
R
.
color
.
flexible_text_gray
));
helper
.
setTextColor
(
R
.
id
.
tv_remark
,
helper
.
getConvertView
().
getResources
().
getColor
(
R
.
color
.
flexible_text_gray
));
helper
.
setBackgroundRes
(
R
.
id
.
tv_dep
,
R
.
drawable
.
shape_blue_btn
);
helper
.
setGone
(
R
.
id
.
iv_last
,
false
);
helper
.
setGone
(
R
.
id
.
iv_simple
,
true
);
}
// helper.setText(R.id.tv_status, item.getOptUserName() + item.getEventCodeName());
// helper.setText(R.id.tv_time, item.getCreatedTime());
// helper.setText(R.id.tv_remark, "备注:" + item.getOptComment());
String
startNum
=
item
.
getStatus
().
substring
(
0
,
1
);
String
endNum
=
item
.
getStatus
().
substring
(
item
.
getStatus
().
length
()
-
1
);
String
dep
=
""
;
switch
(
endNum
)
{
case
"0"
:
dep
=
"买家"
;
break
;
case
"1"
:
dep
=
"部门管理员"
;
break
;
case
"2"
:
dep
=
"业务员"
;
break
;
case
"3"
:
dep
=
"财务部"
;
break
;
case
"4"
:
dep
=
"集团"
;
break
;
}
helper
.
setText
(
R
.
id
.
tv_dep
,
dep
);
if
(
TextUtils
.
equals
(
"10"
,
item
.
getStatus
()))
{
helper
.
setText
(
R
.
id
.
tv_time
,
item
.
getCreatedTime
());
helper
.
setText
(
R
.
id
.
tv_desc
,
item
.
getCreatedByName
().
concat
(
"发起审核"
));
}
else
{
helper
.
setText
(
R
.
id
.
tv_time
,
item
.
getUpdatedTime
());
helper
.
setText
(
R
.
id
.
tv_desc
,
item
.
getUpdatedByName
().
concat
(
TextUtils
.
equals
(
"1"
,
startNum
)
?
"通过审核"
:
"驳回审核"
));
}
helper
.
setText
(
R
.
id
.
tv_remark
,
"备注:"
+
item
.
getApplyRemark
());
}
}
...
...
app/src/main/res/layout/item_return_history.xml
浏览文件 @
8c63faeb
...
...
@@ -67,7 +67,6 @@
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"销售部门管理员通过审核"
android:textColor=
"#ff359486"
android:textSize=
"12sp"
/>
</LinearLayout>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论