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
ee019918
提交
ee019918
authored
6月 19, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改订单,到外列表
上级
9f5537bb
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
144 行增加
和
49 行删除
+144
-49
WorkFragment.java
app/src/main/java/com/wd/workoffice/ui/fg/WorkFragment.java
+107
-43
fg_work.xml
app/src/main/res/layout/fg_work.xml
+37
-6
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/fg/WorkFragment.java
浏览文件 @
ee019918
...
...
@@ -17,6 +17,16 @@ import com.wd.workoffice.retrofit.WorkObserver;
import
com.wd.workoffice.ui.activity.WorkOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.approval.ApprovalDealActivity
;
import
com.wd.workoffice.ui.activity.bat.approval.WorkApprovalActivity
;
import
com.wd.workoffice.ui.activity.bat.order.product.ProductInsideOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.product.ProductOutOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.product.ProductSaleOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.product.ProductSupplierOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.sale.SaleCrucibleOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.sale.SaleInsideOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.sale.SaleOutOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.sale.SaleProductOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.sale.SaleSaleOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.order.sale.SaleSupplierOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.work.DeviceActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkContactsActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkDepActivity
;
...
...
@@ -25,7 +35,6 @@ import com.wd.workoffice.ui.activity.bat.work.WorkInStockActivity;
import
com.wd.workoffice.ui.activity.bat.work.WorkProActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkWarehouseActivity
;
import
com.wd.workoffice.ui.adapter.BatLayoutAdapter
;
import
com.wd.workoffice.util.UserKeeper
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -37,8 +46,6 @@ import butterknife.ButterKnife;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
/**
* author : flexible
* email : lgd19940421@163.com
...
...
@@ -49,19 +56,6 @@ public class WorkFragment extends WorkBaseFg {
RecyclerView
rvFunction
;
@BindView
(
R
.
id
.
srl_refresh
)
SmartRefreshLayout
srlRefresh
;
List
<
BatLayoutVo
>
workList
=
new
ArrayList
<>();
int
[]
workImg
=
new
int
[]{
R
.
mipmap
.
work_icon1
,
R
.
mipmap
.
work_icon2
,
// R.mipmap.work_icon3,
R
.
mipmap
.
work_icon4
,
R
.
mipmap
.
work_icon5
,
R
.
mipmap
.
work_icon6
,
R
.
mipmap
.
work_icon7
,
// R.mipmap.work_icon8, R.mipmap.work_icon9,
R
.
mipmap
.
work_icon10
,
R
.
mipmap
.
work_icon11
};
String
[]
workName
=
new
String
[]{
"产品"
,
"往来"
,
// "部门账户",
"仓库"
,
"部门"
,
"财务中心"
,
"设备"
,
// "流程", "报表",
"库存类别"
,
"订单"
};
@BindView
(
R
.
id
.
ll_submit
)
LinearLayout
llSubmit
;
@BindView
(
R
.
id
.
ll_not_deal
)
...
...
@@ -72,12 +66,39 @@ public class WorkFragment extends WorkBaseFg {
TextView
tvSubmitNum
;
@BindView
(
R
.
id
.
tv_not_deal_num
)
TextView
tvNotDealNum
;
List
<
BatLayoutVo
>
workList
=
new
ArrayList
<>();
int
[]
workImg
=
new
int
[]{
R
.
mipmap
.
work_icon1
,
R
.
mipmap
.
work_icon2
,
// R.mipmap.work_icon3,
R
.
mipmap
.
work_icon4
,
R
.
mipmap
.
work_icon5
,
R
.
mipmap
.
work_icon6
,
R
.
mipmap
.
work_icon7
,
// R.mipmap.work_icon8, R.mipmap.work_icon9,
R
.
mipmap
.
work_icon10
,
// R.mipmap.work_icon11
};
String
[]
workName
=
new
String
[]{
"产品"
,
"往来"
,
// "部门账户",
"仓库"
,
"部门"
,
"财务中心"
,
"设备"
,
// "流程", "报表",
"库存类别"
};
List
<
BatLayoutVo
>
saleList
=
new
ArrayList
<>();
List
<
BatLayoutVo
>
productList
=
new
ArrayList
<>();
int
[]
productImg
=
new
int
[]{
R
.
mipmap
.
order_sale1
,
R
.
mipmap
.
order_sale2
,
R
.
mipmap
.
order_sale3
,
R
.
mipmap
.
order_sale4
,
R
.
mipmap
.
order_sale5
,
R
.
mipmap
.
order_sale6
};
String
[]
saleName
=
new
String
[]{
"销售订单"
,
"外采购订单"
,
"供应订单"
,
"内部订单"
,
"组装订单"
,
"坩埚订单"
};
int
[]
saleImg
=
new
int
[]{
R
.
mipmap
.
order_product1
,
R
.
mipmap
.
order_product2
,
R
.
mipmap
.
order_product3
,
R
.
mipmap
.
order_product4
,
R
.
mipmap
.
order_product5
,
R
.
mipmap
.
order_product6
};
String
[]
productName
=
new
String
[]{
"销售订单"
,
"外采购订单"
,
"供应订单"
,
"内部订单"
,
"组装订单"
,
"坩埚订单"
};
@BindView
(
R
.
id
.
rv_sale
)
RecyclerView
rvSale
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
,
getContentView
());
addDate
(
workList
,
workImg
,
workName
);
initRvLayout
(
rvFunction
,
workList
);
addDate
(
saleList
,
saleImg
,
saleName
);
addDate
(
productList
,
productImg
,
productName
);
initOrderRvLayout
(
rvSale
,
saleList
);
initOrderRvLayout
(
rvProduct
,
productList
);
}
@Override
...
...
@@ -101,33 +122,6 @@ public class WorkFragment extends WorkBaseFg {
tvSubmitNum
.
setText
(
getNumValue
(
dataJson
.
getIntValue
(
"otherUserCanAudit"
)));
}
});
// Map<String, Object> param = WorkUtils.pageKey();
// RtfUtils.getRtf().notice(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<MsgBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), MsgBean.class).getRecords();
// if (getList != null && getList.size() != 0) {
// MsgBean.RecordsBean recordsBean = getList.get(0);
// tvNotice.setText(recordsBean.getTitle());
// }
// }
// });
}
private
String
getNumValue
(
int
value
)
{
...
...
@@ -229,4 +223,74 @@ public class WorkFragment extends WorkBaseFg {
break
;
}
}
/**
* 初始化布局
*
* @param rvSale
* @param saleList
*/
private
void
initOrderRvLayout
(
RecyclerView
rvSale
,
List
<
BatLayoutVo
>
saleList
)
{
rvSale
.
setLayoutManager
(
new
GridLayoutManager
(
getActivity
(),
4
,
RecyclerView
.
VERTICAL
,
false
));
BatLayoutAdapter
batLayoutAdapter
=
new
BatLayoutAdapter
(
R
.
layout
.
item_bat_layout
,
saleList
);
batLayoutAdapter
.
bindToRecyclerView
(
rvSale
);
switch
(
rvSale
.
getId
())
{
case
R
.
id
.
rv_sale
:
batLayoutAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
position
)
{
case
0
:
startActivity
(
SaleSaleOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
1
:
startActivity
(
SaleOutOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
2
:
startActivity
(
SaleSupplierOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
3
:
startActivity
(
SaleInsideOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
4
:
startActivity
(
SaleProductOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
5
:
startActivity
(
SaleCrucibleOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
}
}
});
break
;
case
R
.
id
.
rv_product
:
batLayoutAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
position
)
{
case
0
:
startActivity
(
ProductSaleOrderActivity
.
class
);
break
;
case
1
:
startActivity
(
ProductOutOrderActivity
.
class
);
break
;
case
2
:
startActivity
(
ProductSupplierOrderActivity
.
class
);
break
;
case
3
:
startActivity
(
ProductInsideOrderActivity
.
class
);
break
;
case
4
:
startActivity
(
SaleProductOrderActivity
.
class
,
"identity"
,
"2"
);
break
;
case
5
:
startActivity
(
SaleCrucibleOrderActivity
.
class
,
"identity"
,
"2"
);
break
;
}
}
});
break
;
}
}
}
app/src/main/res/layout/fg_work.xml
浏览文件 @
ee019918
...
...
@@ -5,7 +5,9 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
...
...
@@ -163,9 +165,7 @@
</FrameLayout>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -176,7 +176,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"
3
0mm"
android:paddingVertical=
"
2
0mm"
android:text=
"常用功能"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
...
...
@@ -187,7 +187,37 @@
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"20mm"
android:text=
"作为买家"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_sale"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"20mm"
android:text=
"作为卖家"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_product"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论