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
10c5b3d8
提交
10c5b3d8
authored
4月 09, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.组装订单
2.//TODO erp用户激活测试,忘记/重置密码测试,坩埚下单页面,组装列表,往来(客户两个库),产品下单还差附件,mes,消息,刷新token
上级
1fe1c23c
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
1170 行增加
和
2 行删除
+1170
-2
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+16
-1
OrderBean.java
app/src/main/java/com/wd/workoffice/bean/OrderBean.java
+36
-0
CheckOrderEvent.java
...in/java/com/wd/workoffice/bean/event/CheckOrderEvent.java
+14
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+15
-0
SaleCrucibleOrderActivity.java
...ffice/ui/activity/bat/sale/SaleCrucibleOrderActivity.java
+90
-0
SaleProductOrderActivity.java
...office/ui/activity/bat/sale/SaleProductOrderActivity.java
+90
-0
SaleProductAdapter.java
...java/com/wd/workoffice/ui/adapter/SaleProductAdapter.java
+37
-0
SaleProductApplyAdapter.java
...com/wd/workoffice/ui/adapter/SaleProductApplyAdapter.java
+33
-0
MainFragment.java
app/src/main/java/com/wd/workoffice/ui/fg/MainFragment.java
+3
-0
ProductOrderApplyFragment.java
...va/com/wd/workoffice/ui/fg/ProductOrderApplyFragment.java
+73
-0
ProductOrderApplyListFragment.java
...om/wd/workoffice/ui/fg/ProductOrderApplyListFragment.java
+170
-0
ProductOrderFragment.java
...in/java/com/wd/workoffice/ui/fg/ProductOrderFragment.java
+167
-0
StoreFinancialFragment.java
.../java/com/wd/workoffice/ui/fg/StoreFinancialFragment.java
+1
-1
item_sale_product.xml
app/src/main/res/layout/item_sale_product.xml
+254
-0
item_sale_product_apply.xml
app/src/main/res/layout/item_sale_product_apply.xml
+171
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
10c5b3d8
...
...
@@ -816,7 +816,22 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.sale.SaleProductOrderActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"组装订单"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.sale.SaleCrucibleOrderActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"坩埚订单"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/bean/OrderBean.java
浏览文件 @
10c5b3d8
...
...
@@ -87,9 +87,45 @@ public class OrderBean {
private
String
attrName
;
private
String
requireTime
;
private
String
inStockName
;
private
String
enterStockName
;
private
String
usedStockName
;
private
Object
deptId
;
private
List
<
OrderItemsBean
>
orderItems
;
private
List
<
OrderFlowsBean
>
orderFlows
;
private
String
serialNumber
;
private
String
appliedByName
;
public
String
getAppliedByName
()
{
return
appliedByName
;
}
public
void
setAppliedByName
(
String
appliedByName
)
{
this
.
appliedByName
=
appliedByName
;
}
public
String
getSerialNumber
()
{
return
serialNumber
;
}
public
void
setSerialNumber
(
String
serialNumber
)
{
this
.
serialNumber
=
serialNumber
;
}
public
String
getUsedStockName
()
{
return
usedStockName
;
}
public
void
setUsedStockName
(
String
usedStockName
)
{
this
.
usedStockName
=
usedStockName
;
}
public
String
getEnterStockName
()
{
return
enterStockName
;
}
public
void
setEnterStockName
(
String
enterStockName
)
{
this
.
enterStockName
=
enterStockName
;
}
public
String
getInStockName
()
{
return
inStockName
;
...
...
app/src/main/java/com/wd/workoffice/bean/event/CheckOrderEvent.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
bean
.
event
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
CheckOrderEvent
{
public
CheckOrderEvent
()
{
}
}
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
10c5b3d8
...
...
@@ -1059,5 +1059,20 @@ public interface ApiService {
@GET
(
"/product/search-list"
)
Observable
<
BaseBean
>
tradingProDialog
(
@Query
(
"soleCode"
)
String
soleCode
);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET
(
"/package-order/app/page/list"
)
Observable
<
BaseBean
>
productList
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET
(
"/packageApply/app/page/list"
)
Observable
<
BaseBean
>
productApplyList
(
@QueryMap
Map
<
String
,
Object
>
param
);
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/sale/SaleCrucibleOrderActivity.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
sale
;
import
android.os.Bundle
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
com.google.android.material.tabs.TabLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.ui.activity.bat.SupplierOrderSearchActivity
;
import
com.wd.workoffice.ui.adapter.VpDataAdapter
;
import
com.wd.workoffice.ui.fg.ProductOrderApplyFragment
;
import
com.wd.workoffice.ui.fg.ProductOrderFragment
;
import
java.util.ArrayList
;
import
java.util.List
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.viewpager.widget.ViewPager
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
static
com
.
google
.
android
.
material
.
tabs
.
TabLayout
.
MODE_FIXED
;
/**
* 销售 - 坩埚订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
SaleCrucibleOrderActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tl_tab
)
TabLayout
tlTab
;
@BindView
(
R
.
id
.
vp_data
)
ViewPager
vpData
;
private
String
tab
[]
=
{
"坩埚生产订单"
,
"坩埚销售订单"
};
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
tlTab
.
setupWithViewPager
(
vpData
);
tlTab
.
setTabMode
(
MODE_FIXED
);
}
@Override
protected
void
initData
()
{
FragmentManager
sfm
=
getSupportFragmentManager
();
List
<
Fragment
>
data
=
new
ArrayList
<>();
ProductOrderFragment
saleFragment
=
new
ProductOrderFragment
();
ProductOrderApplyFragment
applyFragment
=
new
ProductOrderApplyFragment
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"identity"
,
"1"
);
saleFragment
.
setArguments
(
bundle
);
applyFragment
.
setArguments
(
bundle
);
data
.
add
(
saleFragment
);
data
.
add
(
applyFragment
);
VpDataAdapter
vpFgAdapter
=
new
VpDataAdapter
(
sfm
,
data
);
vpData
.
setAdapter
(
vpFgAdapter
);
for
(
int
i
=
0
;
i
<
tab
.
length
;
i
++)
{
tlTab
.
getTabAt
(
i
).
setText
(
tab
[
i
]);
}
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_order
;
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
menu_search
,
menu
);
return
super
.
onCreateOptionsMenu
(
menu
);
}
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
search
:
startActivity
(
SupplierOrderSearchActivity
.
class
,
"identity"
,
"1"
,
""
,
""
);
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/sale/SaleProductOrderActivity.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
sale
;
import
android.os.Bundle
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
com.google.android.material.tabs.TabLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.ui.activity.bat.SupplierOrderSearchActivity
;
import
com.wd.workoffice.ui.adapter.VpDataAdapter
;
import
com.wd.workoffice.ui.fg.ProductOrderApplyFragment
;
import
com.wd.workoffice.ui.fg.ProductOrderFragment
;
import
java.util.ArrayList
;
import
java.util.List
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.viewpager.widget.ViewPager
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
static
com
.
google
.
android
.
material
.
tabs
.
TabLayout
.
MODE_FIXED
;
/**
* 销售 - 供应订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
SaleProductOrderActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tl_tab
)
TabLayout
tlTab
;
@BindView
(
R
.
id
.
vp_data
)
ViewPager
vpData
;
private
String
tab
[]
=
{
"组装订单"
,
"组装申请"
};
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
tlTab
.
setupWithViewPager
(
vpData
);
tlTab
.
setTabMode
(
MODE_FIXED
);
}
@Override
protected
void
initData
()
{
FragmentManager
sfm
=
getSupportFragmentManager
();
List
<
Fragment
>
data
=
new
ArrayList
<>();
ProductOrderFragment
saleFragment
=
new
ProductOrderFragment
();
ProductOrderApplyFragment
applyFragment
=
new
ProductOrderApplyFragment
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"identity"
,
"1"
);
saleFragment
.
setArguments
(
bundle
);
applyFragment
.
setArguments
(
bundle
);
data
.
add
(
saleFragment
);
data
.
add
(
applyFragment
);
VpDataAdapter
vpFgAdapter
=
new
VpDataAdapter
(
sfm
,
data
);
vpData
.
setAdapter
(
vpFgAdapter
);
for
(
int
i
=
0
;
i
<
tab
.
length
;
i
++)
{
tlTab
.
getTabAt
(
i
).
setText
(
tab
[
i
]);
}
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_order
;
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
menu_search
,
menu
);
return
super
.
onCreateOptionsMenu
(
menu
);
}
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
search
:
startActivity
(
SupplierOrderSearchActivity
.
class
,
"identity"
,
"1"
,
""
,
""
);
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/SaleProductAdapter.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderBean
;
import
java.util.List
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
SaleProductAdapter
extends
BaseQuickAdapter
<
OrderBean
,
BaseViewHolder
>
{
public
SaleProductAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getCustomerName
());
helper
.
setText
(
R
.
id
.
tv_status
,
item
.
getStatusName
());
helper
.
setText
(
R
.
id
.
tv_dep
,
item
.
getReceiveDeptName
());
helper
.
setText
(
R
.
id
.
tv_place_name
,
item
.
getLaunchUserName
());
helper
.
setText
(
R
.
id
.
tv_company
,
item
.
getLaunchDeptName
());
helper
.
setText
(
R
.
id
.
tv_supplier
,
item
.
getSupplierName
());
helper
.
setText
(
R
.
id
.
tv_order_no
,
item
.
getId
());
helper
.
setText
(
R
.
id
.
tv_time
,
item
.
getCreatedTime
());
helper
.
setText
(
R
.
id
.
tv_send_time
,
item
.
getRequireTime
());
helper
.
setText
(
R
.
id
.
tv_desc
,
item
.
getAttrName
());
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
valueOf
(
item
.
getLaunchOrderAmount
()));
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/SaleProductApplyAdapter.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderBean
;
import
java.util.List
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
SaleProductApplyAdapter
extends
BaseQuickAdapter
<
OrderBean
,
BaseViewHolder
>
{
public
SaleProductApplyAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getCustomerName
());
helper
.
setText
(
R
.
id
.
tv_status
,
item
.
getStatusName
());
helper
.
setText
(
R
.
id
.
tv_dep
,
item
.
getUsedStockName
());
helper
.
setText
(
R
.
id
.
tv_from_dep
,
item
.
getEnterStockName
());
helper
.
setText
(
R
.
id
.
tv_person
,
item
.
getAppliedByName
());
helper
.
setText
(
R
.
id
.
tv_time
,
item
.
getCreatedTime
());
helper
.
setText
(
R
.
id
.
tv_code
,
item
.
getSerialNumber
());
}
}
app/src/main/java/com/wd/workoffice/ui/fg/MainFragment.java
浏览文件 @
10c5b3d8
...
...
@@ -11,6 +11,7 @@ import com.wd.workoffice.app.WorkBaseFg;
import
com.wd.workoffice.bean.vo.BatLayoutVo
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.sale.SaleProductOrderActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreFinancialActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkInStockActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreCrucibleActivity
;
...
...
@@ -181,6 +182,7 @@ public class MainFragment extends WorkBaseFg {
startActivity
(
SaleInsideOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
4
:
startActivity
(
SaleProductOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
5
:
break
;
...
...
@@ -236,6 +238,7 @@ public class MainFragment extends WorkBaseFg {
startActivity
(
ProductInsideOrderActivity
.
class
);
break
;
case
4
:
startActivity
(
SaleProductOrderActivity
.
class
);
break
;
case
5
:
break
;
...
...
app/src/main/java/com/wd/workoffice/ui/fg/ProductOrderApplyFragment.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
fg
;
import
android.os.Bundle
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
com.google.android.material.tabs.TabLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.ui.activity.bat.SupplierOrderSearchActivity
;
import
com.wd.workoffice.ui.adapter.VpDataAdapter
;
import
java.util.ArrayList
;
import
java.util.List
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.viewpager.widget.ViewPager
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
/**
* 销售 - 供应订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ProductOrderApplyFragment
extends
WorkBaseFg
{
@BindView
(
R
.
id
.
tl_tab
)
TabLayout
tlTab
;
@BindView
(
R
.
id
.
vp_data
)
ViewPager
vpData
;
private
String
tab
[]
=
{
"未审核"
,
"已通过"
,
"已驳回"
};
private
String
order
[]
=
{
"0"
,
"1"
,
"2"
};
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
,
getContentView
());
tlTab
.
setupWithViewPager
(
vpData
);
tlTab
.
setTabMode
(
TabLayout
.
MODE_FIXED
);
}
@Override
protected
void
initData
()
{
FragmentManager
sfm
=
getChildFragmentManager
();
List
<
Fragment
>
data
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
tab
.
length
;
i
++)
{
ProductOrderApplyListFragment
saleFragment
=
new
ProductOrderApplyListFragment
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"state"
,
order
[
i
]);
bundle
.
putString
(
"identity"
,
"1"
);
saleFragment
.
setArguments
(
bundle
);
data
.
add
(
saleFragment
);
}
VpDataAdapter
vpFgAdapter
=
new
VpDataAdapter
(
sfm
,
data
);
vpData
.
setAdapter
(
vpFgAdapter
);
for
(
int
i
=
0
;
i
<
tab
.
length
;
i
++)
{
tlTab
.
getTabAt
(
i
).
setText
(
tab
[
i
]);
}
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_order
;
}
}
app/src/main/java/com/wd/workoffice/ui/fg/ProductOrderApplyListFragment.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
fg
;
import
android.os.Bundle
;
import
android.view.View
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.bean.LogisticBean
;
import
com.wd.workoffice.bean.OrderBean
;
import
com.wd.workoffice.bean.event.CheckLogisticEvent
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.work.WorkLogisticsDetailActivity
;
import
com.wd.workoffice.ui.adapter.SaleProductAdapter
;
import
com.wd.workoffice.ui.adapter.SaleProductApplyAdapter
;
import
com.wd.workoffice.ui.adapter.WorkLogisticAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ProductOrderApplyListFragment
extends
WorkBaseFg
{
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
srl_refresh
)
SmartRefreshLayout
srlRefresh
;
private
String
state
;
private
int
page
=
1
;
private
Map
<
String
,
Object
>
param
;
private
SaleProductApplyAdapter
dataAdapter
;
private
List
<
OrderBean
>
dataList
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
,
getContentView
());
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
(),
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"status"
,
state
);
page
=
1
;
param
.
put
(
"current"
,
page
);
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
SaleProductApplyAdapter
(
R
.
layout
.
item_sale_product_apply
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvData
);
getData
();
}
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Bundle
arguments
=
getArguments
();
if
(
arguments
!=
null
)
{
state
=
arguments
.
getString
(
"state"
);
}
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
productApplyList
(
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
<
OrderBean
>
getList
=
JSON
.
parseArray
(
JSON
.
parseObject
(
data
.
getData
().
toString
()).
getString
(
"records"
),
OrderBean
.
class
);
if
(
page
==
1
)
{
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
++;
}
}
});
}
@Override
protected
void
initEvent
()
{
srlRefresh
.
setOnRefreshListener
(
refreshLayout
->
{
page
=
1
;
param
.
put
(
"current"
,
page
);
getData
();
});
dataAdapter
.
setOnLoadMoreListener
(()
->
{
param
.
put
(
"current"
,
page
);
getData
();
},
rvData
);
dataAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
startActivity
(
WorkLogisticsDetailActivity
.
class
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)));
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
fg_work_contacts
;
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
CheckOrderEvent
event
)
{
page
=
1
;
param
.
put
(
"current"
,
page
);
getData
();
}
}
app/src/main/java/com/wd/workoffice/ui/fg/ProductOrderFragment.java
0 → 100644
浏览文件 @
10c5b3d8
package
com
.
wd
.
workoffice
.
ui
.
fg
;
import
android.os.Bundle
;
import
android.view.View
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.bean.LogisticBean
;
import
com.wd.workoffice.bean.OrderBean
;
import
com.wd.workoffice.bean.event.CheckLogisticEvent
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.work.WorkLogisticsDetailActivity
;
import
com.wd.workoffice.ui.adapter.SaleProductAdapter
;
import
com.wd.workoffice.ui.adapter.WorkLogisticAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ProductOrderFragment
extends
WorkBaseFg
{
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
srl_refresh
)
SmartRefreshLayout
srlRefresh
;
private
String
state
;
private
int
page
=
1
;
private
Map
<
String
,
Object
>
param
;
private
SaleProductAdapter
dataAdapter
;
private
List
<
OrderBean
>
dataList
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
,
getContentView
());
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
(),
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
param
=
WorkUtils
.
pageKey
();
// param.put("status", state);
page
=
1
;
param
.
put
(
"current"
,
page
);
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
SaleProductAdapter
(
R
.
layout
.
item_sale_product
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvData
);
getData
();
}
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Bundle
arguments
=
getArguments
();
if
(
arguments
!=
null
)
{
state
=
arguments
.
getString
(
"state"
);
}
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
productList
(
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
<
OrderBean
>
getList
=
JSON
.
parseArray
(
JSON
.
parseObject
(
data
.
getData
().
toString
()).
getString
(
"records"
),
OrderBean
.
class
);
if
(
page
==
1
)
{
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
++;
}
}
});
}
@Override
protected
void
initEvent
()
{
srlRefresh
.
setOnRefreshListener
(
refreshLayout
->
{
page
=
1
;
param
.
put
(
"current"
,
page
);
getData
();
});
dataAdapter
.
setOnLoadMoreListener
(()
->
{
param
.
put
(
"current"
,
page
);
getData
();
},
rvData
);
dataAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
startActivity
(
WorkLogisticsDetailActivity
.
class
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)));
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
fg_work_contacts
;
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
CheckOrderEvent
event
)
{
page
=
1
;
param
.
put
(
"current"
,
page
);
getData
();
}
}
app/src/main/java/com/wd/workoffice/ui/fg/StoreFinancialFragment.java
浏览文件 @
10c5b3d8
...
...
@@ -68,7 +68,7 @@ public class StoreFinancialFragment extends WorkBaseFg {
dataAdapter
=
new
WorkLogisticAdapter
(
R
.
layout
.
item_logistics
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvData
);
getData
();
//
getData();
}
@Override
...
...
app/src/main/res/layout/item_sale_product.xml
0 → 100644
浏览文件 @
10c5b3d8
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10mm"
android:paddingTop=
"10mm"
android:paddingBottom=
"20mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5mm"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"邢台德龙钢铁客户"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"待生产"
android:textColor=
"#0841F0"
android:textSize=
"14sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:paddingVertical=
"10mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rl_dep"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"接单部门"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_dep"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<!-- 1.下单 -->
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"下单人"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_place_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<!-- 2.所属公司 -->
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"所属公司"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_company"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"王紫逸"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/rv_supplier"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"供应商"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_supplier"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<!-- 3.订单编号 -->
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"订单编号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_order_no"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"王紫逸"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<!-- 4.下单时间 -->
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"下单时间"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"王紫逸"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<!-- 3.要求发货时间 -->
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"要求发货时间"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_send_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"王紫逸"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"right"
>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"15mm"
android:text=
"对方发起提前结束"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"13sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"订单总价:¥"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"15sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_sale_product_apply.xml
0 → 100644
浏览文件 @
10c5b3d8
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10mm"
android:paddingTop=
"10mm"
android:paddingBottom=
"20mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5mm"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"邢台德龙钢铁客户"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"待生产"
android:textColor=
"@color/orange"
android:textSize=
"14sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:paddingVertical=
"10mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rl_dep"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"申请编号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_code"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"来源仓库"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_from_dep"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"领用仓库"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_dep"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"王紫逸"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/rv_supplier"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"申请人"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_person"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"申请时间"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:text=
"王紫逸"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论