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
d110c987
提交
d110c987
authored
8月 04, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.供应订单,领料申请,未测试
2.TODO 领用申请接口地址,三个列表都是403,三个功能测试,下单新增唛头
上级
0ce36597
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
1404 行增加
和
66 行删除
+1404
-66
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+24
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+30
-1
PickApplyActivity.java
...d/workoffice/ui/activity/bat/order/PickApplyActivity.java
+112
-0
PickApplyAddActivity.java
...orkoffice/ui/activity/bat/order/PickApplyAddActivity.java
+332
-0
PickApplyDetailActivity.java
...office/ui/activity/bat/order/PickApplyDetailActivity.java
+250
-0
SupplierOrderDetailActivity.java
...ce/ui/activity/bat/order/SupplierOrderDetailActivity.java
+27
-8
SupplierOrderDetailProductAdapter.java
...koffice/ui/adapter/SupplierOrderDetailProductAdapter.java
+1
-1
WorkSendApplyAddAdapter.java
...com/wd/workoffice/ui/adapter/WorkSendApplyAddAdapter.java
+18
-7
PickApplyFragment.java
.../main/java/com/wd/workoffice/ui/fg/PickApplyFragment.java
+296
-0
activity_add_stock_apply_detail.xml
app/src/main/res/layout/activity_add_stock_apply_detail.xml
+2
-2
activity_bat_retrun_detail.xml
app/src/main/res/layout/activity_bat_retrun_detail.xml
+0
-1
activity_crucible_order.xml
app/src/main/res/layout/activity_crucible_order.xml
+3
-3
activity_device_buy_detail.xml
app/src/main/res/layout/activity_device_buy_detail.xml
+2
-2
activity_end_apply_detail.xml
app/src/main/res/layout/activity_end_apply_detail.xml
+2
-2
activity_financial_detail.xml
app/src/main/res/layout/activity_financial_detail.xml
+1
-1
activity_inside_order.xml
app/src/main/res/layout/activity_inside_order.xml
+3
-4
activity_mes_service_check_detail.xml
...src/main/res/layout/activity_mes_service_check_detail.xml
+1
-1
activity_mes_service_detail.xml
app/src/main/res/layout/activity_mes_service_detail.xml
+1
-1
activity_out_order.xml
app/src/main/res/layout/activity_out_order.xml
+3
-4
activity_product_apply_detail.xml
app/src/main/res/layout/activity_product_apply_detail.xml
+2
-2
activity_sale_order.xml
app/src/main/res/layout/activity_sale_order.xml
+3
-4
activity_send_apply_add.xml
app/src/main/res/layout/activity_send_apply_add.xml
+3
-0
activity_send_apply_detail.xml
app/src/main/res/layout/activity_send_apply_detail.xml
+2
-2
activity_supplier_order.xml
app/src/main/res/layout/activity_supplier_order.xml
+49
-10
activity_use_apply_detail.xml
app/src/main/res/layout/activity_use_apply_detail.xml
+2
-2
activity_work_financial_out_detail.xml
...rc/main/res/layout/activity_work_financial_out_detail.xml
+2
-2
activity_work_financial_ticket_detail.xml
...main/res/layout/activity_work_financial_ticket_detail.xml
+2
-2
activity_work_logistics_detail.xml
app/src/main/res/layout/activity_work_logistics_detail.xml
+2
-2
item_financial_out.xml
app/src/main/res/layout/item_financial_out.xml
+2
-2
item_pick_add.xml
app/src/main/res/layout/item_pick_add.xml
+227
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
d110c987
...
...
@@ -2351,6 +2351,30 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.order.PickApplyActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:label=
"领料申请列表"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.order.PickApplyAddActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:label=
"领料申请新增"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.order.PickApplyDetailActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
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/retrofit/ApiService.java
浏览文件 @
d110c987
...
...
@@ -1254,6 +1254,13 @@ public interface ApiService {
*/
@GET
(
"/supplierOrder/oneInfo/{orderId}"
)
Observable
<
BaseBean
>
supplierOrderDetail
(
@Path
(
"orderId"
)
String
orderId
,
@Query
(
"type"
)
String
type
);
/**
* 获取供应订单领料申请分页列表
*
* @return
*/
@GET
(
"/pick-apply/page/list"
)
Observable
<
BaseBean
>
pickApplyList
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 获取发货申请分页列表
*
...
...
@@ -1261,7 +1268,6 @@ public interface ApiService {
*/
@GET
(
"/send-out-store-apply/page/list"
)
Observable
<
BaseBean
>
sendApplyList
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 获取发货申请分页列表
*
...
...
@@ -1284,6 +1290,13 @@ public interface ApiService {
*/
@PUT
(
"/send-out-store-apply/status"
)
Observable
<
BaseBean
>
sendApplyCheck
(
@Body
RequestBody
requestBody
);
/**
* 审批领料申请
*
* @return
*/
@PUT
(
"/pick-apply/status"
)
Observable
<
BaseBean
>
pickApplyCheck
(
@Body
RequestBody
requestBody
);
/**
* 审批发货申请
*
...
...
@@ -1307,6 +1320,14 @@ public interface ApiService {
@GET
(
"/send-out-store-apply/item/list"
)
Observable
<
BaseBean
>
sendApplyDetail
(
@Query
(
"applyId"
)
String
applyId
);
/**
* _获取领料申请详细信息列表
*
* @return
*/
@GET
(
"/pick-apply/item/list"
)
Observable
<
BaseBean
>
pickApplyDetail
(
@Query
(
"applyId"
)
String
applyId
);
/**
* _step6_1发起发货申请
*
...
...
@@ -1315,6 +1336,14 @@ public interface ApiService {
@POST
(
"/procedureStart/so/applyOutStock/{orderId}"
)
Observable
<
BaseBean
>
sendApply
(
@Path
(
"orderId"
)
String
orderId
,
@Body
RequestBody
requestBody
);
/**
* 领料
*
* @return
*/
@POST
(
"/procedureStart/fo/pick-apply/{orderId}"
)
Observable
<
BaseBean
>
pickApply
(
@Path
(
"orderId"
)
String
orderId
,
@Body
RequestBody
requestBody
);
/**
* _step6_1发起发货申请
*
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/PickApplyActivity.java
0 → 100644
浏览文件 @
d110c987
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
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.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.ui.adapter.VpDataAdapter
;
import
com.wd.workoffice.ui.fg.PickApplyFragment
;
import
com.wd.workoffice.ui.fg.SendApplyFragment
;
import
com.wd.workoffice.util.WorkUtils
;
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
PickApplyActivity
extends
WorkToolBarActivity
{
@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
);
tlTab
.
setupWithViewPager
(
vpData
);
tlTab
.
setTabMode
(
TabLayout
.
MODE_FIXED
);
}
@Override
protected
void
initData
()
{
FragmentManager
sfm
=
getSupportFragmentManager
();
List
<
Fragment
>
data
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
tab
.
length
;
i
++)
{
PickApplyFragment
saleFragment
=
new
PickApplyFragment
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"state"
,
order
[
i
]);
bundle
.
putString
(
"orderId"
,
getIntent
().
getStringExtra
(
"orderId"
));
bundle
.
putString
(
"orderType"
,
getIntent
().
getStringExtra
(
"orderType"
));
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
;
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
String
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
if
(
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_PICK_APPLY_LIST
.
getPermission
()))
{
getMenuInflater
().
inflate
(
R
.
menu
.
menu_add
,
menu
);
}
}
// else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
// if (WorkUtils.hasPermission(PagePermissionType.PO_OUT_SAVE.getPermission())) {
// getMenuInflater().inflate(R.menu.menu_add, menu);
// }
// } else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
// if (WorkUtils.hasPermission(PagePermissionType.CO_OUT_SAVE.getPermission())) {
// getMenuInflater().inflate(R.menu.menu_add, menu);
// }
// }
return
super
.
onCreateOptionsMenu
(
menu
);
}
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
add
:
startActivity
(
PickApplyAddActivity
.
class
,
"orderType"
,
getIntent
().
getStringExtra
(
"orderType"
),
"id"
,
getIntent
().
getStringExtra
(
"orderId"
));
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/PickApplyAddActivity.java
0 → 100644
浏览文件 @
d110c987
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
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.alibaba.fastjson.JSONObject
;
import
com.bigkoo.pickerview.listener.OnTimeSelectListener
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckSendEvent
;
import
com.wd.workoffice.bean.event.SendWeightEvent
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.ui.adapter.WorkSendApplyAddAdapter
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.PickTimeUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
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
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
flexible.xd.android_base.utils.TimeUtils
;
import
io.reactivex.Observable
;
import
io.reactivex.disposables.Disposable
;
/**
* 添加申请领料
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
PickApplyAddActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_bottom
)
TextView
tvBottom
;
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
tv_time
)
TextView
tvTime
;
@BindView
(
R
.
id
.
rl_time
)
RelativeLayout
rlTime
;
@BindView
(
R
.
id
.
tv_weight
)
TextView
tvWeight
;
@BindView
(
R
.
id
.
et_logistics_price
)
EditText
etLogisticsPrice
;
@BindView
(
R
.
id
.
et_logistics_code
)
EditText
etLogisticsCode
;
@BindView
(
R
.
id
.
tv_logistics_company
)
TextView
tvLogisticsCompany
;
@BindView
(
R
.
id
.
rl_set
)
RelativeLayout
rlSet
;
@BindView
(
R
.
id
.
et_remark
)
EditText
etRemark
;
@BindView
(
R
.
id
.
tv_input1
)
TextView
tvInput1
;
@BindView
(
R
.
id
.
tv_desc
)
TextView
tvDesc
;
@BindView
(
R
.
id
.
ll_logistics_price
)
LinearLayout
llLogisticsPrice
;
@BindView
(
R
.
id
.
ll_logistics_code
)
LinearLayout
llLogisticsCode
;
private
List
<
OrderDetail
.
OrderItemsBean
>
dataList
;
private
WorkSendApplyAddAdapter
dataAdapter
;
private
Map
<
String
,
Object
>
param
;
private
OrderDetail
dataBean
;
private
int
clientId
;
private
String
orderType
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
WorkUtils
.
addNumListener
(
etRemark
,
tvInput1
);
rlSet
.
setVisibility
(
View
.
GONE
);
llLogisticsCode
.
setVisibility
(
View
.
GONE
);
llLogisticsPrice
.
setVisibility
(
View
.
GONE
);
rlTime
.
setVisibility
(
View
.
GONE
);
tvDesc
.
setText
(
"领料信息"
);
tvBottom
.
setText
(
"领料"
);
}
@Override
protected
void
initData
()
{
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
WorkSendApplyAddAdapter
(
R
.
layout
.
item_pick_add
,
dataList
,
1
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
new
HashMap
<>();
param
.
put
(
"orderId"
,
getIntent
().
getStringExtra
(
"id"
));
param
.
put
(
"payer"
,
2
);
getData
();
}
@Override
protected
void
initEvent
()
{
}
private
void
getData
()
{
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
saleOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
purchaseOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
supplierOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
BUILD
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
productOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
IN
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
insideOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
CRUCIBLE
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
crucibleSaleOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
else
{
observable
=
RtfUtils
.
getRtf
().
saleOrderDetail
(
getIntent
().
getStringExtra
(
"id"
),
"1"
);
}
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
;
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
param
.
put
(
"orderType"
,
dataBean
.
getExpandInfo
().
getOrderType
());
dataList
.
addAll
(
dataBean
.
getOrderItems
());
dataAdapter
.
notifyDataSetChanged
();
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_send_apply_add
;
}
@OnClick
(
R
.
id
.
tv_bottom
)
public
void
onViewClicked
()
{
if
(
coverProInfo
())
{
submit
();
}
}
private
boolean
coverProInfo
()
{
Map
<
Integer
,
Boolean
>
isChoose
=
dataAdapter
.
getIsChoose
();
List
<
JSONObject
>
info
=
new
ArrayList
<>();
String
totalWeight
=
"0"
;
for
(
Map
.
Entry
<
Integer
,
Boolean
>
entry
:
isChoose
.
entrySet
())
{
if
(
entry
.
getValue
())
{
OrderDetail
.
OrderItemsBean
recordsBean
=
dataList
.
get
(
entry
.
getKey
());
JSONObject
returnData
=
new
JSONObject
();
if
(
TextUtils
.
isEmpty
(
recordsBean
.
getChooseNum
())
||
Double
.
valueOf
(
recordsBean
.
getChooseNum
())
==
0
d
)
{
toast
(
"请选择领料数量"
);
return
false
;
}
totalWeight
=
MathUtils
.
add
(
totalWeight
,
MathUtils
.
multiply
(
recordsBean
.
getChooseNum
(),
String
.
valueOf
(
recordsBean
.
getProductWeight
()),
3
),
3
);
returnData
.
put
(
"productId"
,
recordsBean
.
getProductId
());
returnData
.
put
(
"productAmount"
,
recordsBean
.
getChooseNum
());
info
.
add
(
returnData
);
}
}
if
(
info
.
size
()
==
0
)
{
toast
(
"请选择货品"
);
return
false
;
}
tvWeight
.
setText
(
totalWeight
);
param
.
put
(
"sendOutStoreApplyItemList"
,
info
);
param
.
put
(
"totalWeight"
,
totalWeight
);
return
true
;
}
private
void
submit
()
{
// String price = etLogisticsPrice.getText().toString();
//// String code = etLogisticsCode.getText().toString();
String
remark
=
etRemark
.
getText
().
toString
();
// String time = tvTime.getText().toString();
// if (TextUtils.isEmpty(time)) {
// toast("请选择发货时间");
// return;
// }
// if (TextUtils.isEmpty(price)) {
// toast("请输入运费");
// return;
// }
// if (TextUtils.isEmpty(code)) {
// toast("请输入快递单号");
// return;
// }
// if (clientId == 0) {
// toast("请选择物流公司");
// return;
// }
// param.put("trackingNumber", code);
// param.put("fareMoney", price);
param
.
put
(
"applyRemark"
,
remark
);
// param.put("logisticsId", clientId);
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
pickApply
(
getIntent
().
getStringExtra
(
"id"
),
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
observable
=
RtfUtils
.
getRtf
().
pickApply
(
getIntent
().
getStringExtra
(
"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
CheckSendEvent
());
finish
();
}
});
}
@OnClick
({
R
.
id
.
tv_bottom
,
R
.
id
.
rl_time
,
R
.
id
.
rl_set
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_bottom
:
break
;
case
R
.
id
.
rl_time
:
PickTimeUtils
.
showPickThree
(
PickApplyAddActivity
.
this
,
new
OnTimeSelectListener
()
{
@Override
public
void
onTimeSelect
(
Date
date
,
View
v
)
{
String
time
=
TimeUtils
.
date2String
(
date
,
new
SimpleDateFormat
(
"yyyy-MM-dd"
));
// param.put("requireTime", time);
tvTime
.
setText
(
time
);
}
}).
show
();
break
;
case
R
.
id
.
rl_set
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"flag"
,
"1"
,
"supplier"
,
"选择运输商"
,
"code"
,
"TRANSPORTERS"
);
break
;
}
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
10001
&&
resultCode
==
10001
)
{
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
tvLogisticsCompany
.
setText
(
clientName
);
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
SendWeightEvent
event
)
{
Map
<
Integer
,
Boolean
>
isChoose
=
dataAdapter
.
getIsChoose
();
List
<
JSONObject
>
info
=
new
ArrayList
<>();
String
totalWeight
=
"0"
;
for
(
Map
.
Entry
<
Integer
,
Boolean
>
entry
:
isChoose
.
entrySet
())
{
if
(
entry
.
getValue
())
{
OrderDetail
.
OrderItemsBean
recordsBean
=
dataList
.
get
(
entry
.
getKey
());
JSONObject
returnData
=
new
JSONObject
();
if
(
TextUtils
.
isEmpty
(
recordsBean
.
getChooseNum
())
||
Double
.
valueOf
(
recordsBean
.
getChooseNum
())
==
0
d
)
{
}
totalWeight
=
MathUtils
.
add
(
totalWeight
,
MathUtils
.
multiply
(
recordsBean
.
getChooseNum
(),
String
.
valueOf
(
recordsBean
.
getProductWeight
()),
3
),
3
);
returnData
.
put
(
"productId"
,
recordsBean
.
getProductId
());
returnData
.
put
(
"productAmount"
,
recordsBean
.
getChooseNum
());
info
.
add
(
returnData
);
}
}
tvWeight
.
setText
(
totalWeight
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/PickApplyDetailActivity.java
0 → 100644
浏览文件 @
d110c987
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
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.SendApplyBean
;
import
com.wd.workoffice.bean.SendApplyDetailBean
;
import
com.wd.workoffice.bean.event.CheckSendEvent
;
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.ui.adapter.SendApplyDetailAdapter
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.appcompat.app.AlertDialog
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
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
PickApplyDetailActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_refuse
)
TextView
tvRefuse
;
@BindView
(
R
.
id
.
tv_agree
)
TextView
tvAgree
;
@BindView
(
R
.
id
.
ll_bottom
)
LinearLayout
llBottom
;
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
tv_time
)
TextView
tvTime
;
@BindView
(
R
.
id
.
tv_weight
)
TextView
tvWeight
;
@BindView
(
R
.
id
.
tv_logistics_price
)
TextView
tvLogisticsPrice
;
@BindView
(
R
.
id
.
tv_logistics_code
)
TextView
tvLogisticsCode
;
@BindView
(
R
.
id
.
tv_logistics_company
)
TextView
tvLogisticsCompany
;
@BindView
(
R
.
id
.
tv_remark
)
TextView
tvRemark
;
@BindView
(
R
.
id
.
tv_check_person
)
TextView
tvCheckPerson
;
@BindView
(
R
.
id
.
tv_check_time
)
TextView
tvCheckTime
;
@BindView
(
R
.
id
.
tv_check_remark
)
TextView
tvCheckRemark
;
@BindView
(
R
.
id
.
ll_check
)
LinearLayout
llCheck
;
private
List
<
SendApplyDetailBean
>
dataList
;
private
SendApplyDetailAdapter
dataAdapter
;
private
Map
<
String
,
Object
>
param
;
private
SendApplyBean
.
RecordsBean
info
;
private
String
orderType
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
private
void
changePermission
()
{
boolean
hasPermission
=
true
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
hasPermission
=
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_PICK_APPLY_AUDIT
.
getPermission
());
}
// else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
// hasPermission =WorkUtils.hasPermission(PagePermissionType.PO_OUT_AUDIT.getPermission());
// } else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
// hasPermission =WorkUtils.hasPermission(PagePermissionType.CO_OUT_AUDIT.getPermission());
// }
if
(!
hasPermission
)
{
llBottom
.
setVisibility
(
View
.
GONE
);
}
}
@Override
protected
void
initData
()
{
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
info
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"info"
),
SendApplyBean
.
RecordsBean
.
class
);
getData
(
info
.
getId
()
+
""
);
tvTime
.
setText
(
info
.
getCreatedTime
());
tvWeight
.
setText
(
MathUtils
.
converData
(
info
.
getTotalWeight
(),
3
));
tvLogisticsPrice
.
setText
(
MathUtils
.
converData
(
info
.
getFareMoney
(),
3
));
tvLogisticsCode
.
setText
(
info
.
getTrackingNumber
());
tvLogisticsCompany
.
setText
(
info
.
getTransitPartName
());
tvRemark
.
setText
(
info
.
getApplyRemark
());
if
(
TextUtils
.
equals
(
info
.
getStatus
(),
"0"
))
{
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
changePermission
();
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvCheckPerson
.
setText
(
info
.
getUpdatedUser
());
tvCheckTime
.
setText
(
info
.
getUpdatedTime
());
tvCheckRemark
.
setText
(
info
.
getAuditRemark
());
}
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
SendApplyDetailAdapter
(
R
.
layout
.
item_send_apply_detail
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
new
HashMap
<>();
param
.
put
(
"id"
,
info
.
getId
());
}
private
void
getData
(
String
id
)
{
RtfUtils
.
getRtf
().
pickApplyDetail
(
id
).
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
<
SendApplyDetailBean
>
dataBean
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
SendApplyDetailBean
.
class
);
dataList
.
addAll
(
dataBean
);
dataAdapter
.
notifyDataSetChanged
();
}
});
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_send_apply_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
);
break
;
case
R
.
id
.
tv_agree
:
checkDialog
(
1
);
break
;
}
}
private
void
checkDialog
(
int
status
)
{
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
);
WorkUtils
.
addNumListener
(
etRemark
,
tvNum
);
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
status
!=
1
&&
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
()))
{
toast
(
"请填写备注"
);
return
;
}
check
(
status
,
etRemark
.
getText
().
toString
());
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
private
void
check
(
int
status
,
String
remark
)
{
param
.
put
(
"status"
,
status
);
param
.
put
(
"auditRemark"
,
remark
);
param
.
put
(
"id"
,
info
.
getId
());
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
pickApplyCheck
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
observable
=
RtfUtils
.
getRtf
().
pickApplyCheck
(
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
CheckSendEvent
());
finish
();
}
});
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SupplierOrderDetailActivity.java
浏览文件 @
d110c987
...
...
@@ -180,21 +180,30 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
break
;
case
220
:
llBottom
.
setVisibility
(
View
.
GON
E
);
llBottom
.
setVisibility
(
View
.
VISIBL
E
);
llCheck
.
setVisibility
(
View
.
GONE
);
llApply
.
setVisibility
(
View
.
GONE
);
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
GON
E
);
llBottom
.
setVisibility
(
View
.
VISIBL
E
);
llCheck
.
setVisibility
(
View
.
GONE
);
llApply
.
setVisibility
(
View
.
GONE
);
break
;
case
320
:
llBottom
.
setVisibility
(
View
.
GONE
);
case
320
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
llApply
.
setVisibility
(
View
.
GONE
);
break
;
case
410
:
case
410
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
llApply
.
setVisibility
(
View
.
GONE
);
break
;
case
500
:
case
500
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
llApply
.
setVisibility
(
View
.
GONE
);
break
;
case
600
:
case
600
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
llApply
.
setVisibility
(
View
.
GONE
);
break
;
default
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -383,7 +392,7 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
@OnClick
({
R
.
id
.
ll_see_more
,
R
.
id
.
tv_finish_apply
,
R
.
id
.
tv_send_apply
,
R
.
id
.
tv_refuse
,
R
.
id
.
tv_agree
})
@OnClick
({
R
.
id
.
tv_pick_apply
,
R
.
id
.
ll_see_more
,
R
.
id
.
tv_finish_apply
,
R
.
id
.
tv_send_apply
,
R
.
id
.
tv_refuse
,
R
.
id
.
tv_agree
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
ll_see_more
:
...
...
@@ -440,6 +449,16 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
"orderType"
,
dataBean
.
getExpandInfo
().
getOrderType
(),
"orderId"
,
getIntent
().
getStringExtra
(
"id"
));
break
;
case
R
.
id
.
tv_pick_apply
:
if
(
dataBean
==
null
)
{
toast
(
"正在加载中,请稍后"
);
return
;
}
startActivity
(
PickApplyActivity
.
class
,
"status"
,
getIntent
().
getStringExtra
(
"status"
),
"orderType"
,
dataBean
.
getExpandInfo
().
getOrderType
(),
"orderId"
,
getIntent
().
getStringExtra
(
"id"
));
break
;
case
R
.
id
.
tv_send_apply
:
if
(
dataBean
==
null
)
{
toast
(
"正在加载中,请稍后"
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/SupplierOrderDetailProductAdapter.java
浏览文件 @
d110c987
...
...
@@ -92,7 +92,7 @@ public class SupplierOrderDetailProductAdapter extends BaseQuickAdapter<OrderDet
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_RETURN_LIST
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
fl_return
,
false
);
}
helper
.
setGone
(
R
.
id
.
fl_back
,
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_RETURN_LIST
.
getPermission
()));
helper
.
setGone
(
R
.
id
.
fl_back
,
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_
PICK_
RETURN_LIST
.
getPermission
()));
changeStats
(
helper
,
item
.
getProductId
());
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/WorkSendApplyAddAdapter.java
浏览文件 @
d110c987
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.view.View
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.LogisticDetailBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.SendWeightEvent
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -27,6 +25,7 @@ import java.util.Map;
public
class
WorkSendApplyAddAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
Map
<
Integer
,
Boolean
>
isChoose
=
new
HashMap
<>();
int
type
;
// 0发货 1 领料
public
WorkSendApplyAddAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
...
...
@@ -36,19 +35,31 @@ public class WorkSendApplyAddAdapter extends BaseQuickAdapter<OrderDetail.OrderI
}
}
public
WorkSendApplyAddAdapter
(
int
layoutResId
,
List
data
,
int
type
)
{
super
(
layoutResId
,
data
);
this
.
type
=
type
;
for
(
int
i
=
0
;
i
<
isChoose
.
entrySet
().
size
();
i
++)
{
isChoose
.
put
(
i
,
false
);
}
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderDetail
.
OrderItemsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getProductSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getProductName
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getProductName
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getProductSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
MathUtils
.
converData
(
item
.
getInnerPrice
(),
3
)));
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
MathUtils
.
converData
(
item
.
getInnerPrice
(),
3
)));
// helper.setText(R.id.tv_all_price, "¥".concat(String.valueOf(item.getInnerPrice())));
helper
.
setText
(
R
.
id
.
tv_unit
,
item
.
getProductUnit
());
// helper.setText(R.id.tv_from, WorkUtils.getOrderFrom(item.getType()));
helper
.
setText
(
R
.
id
.
tv_num
,
MathUtils
.
converData
(
item
.
getProductCount
(),
3
));
helper
.
setText
(
R
.
id
.
tv_apply_send_num
,
MathUtils
.
converData
(
item
.
getCanOutStoreProductSum
(),
3
));
helper
.
setText
(
R
.
id
.
tv_send_num
,
String
.
format
(
"已发货:%s"
,
MathUtils
.
converData
(
item
.
getShipSum
(),
3
)));
helper
.
setText
(
R
.
id
.
tv_num
,
MathUtils
.
converData
(
item
.
getProductCount
(),
3
));
helper
.
setText
(
R
.
id
.
tv_apply_send_num
,
MathUtils
.
converData
(
item
.
getCanOutStoreProductSum
(),
3
));
if
(
type
==
1
)
{
helper
.
setText
(
R
.
id
.
tv_send_num
,
String
.
format
(
"已用数量:%s"
,
MathUtils
.
converData
(
item
.
getShipSum
(),
3
)));
}
else
{
helper
.
setText
(
R
.
id
.
tv_send_num
,
String
.
format
(
"已发货:%s"
,
MathUtils
.
converData
(
item
.
getShipSum
(),
3
)));
}
AddAndReduceView
nrcNum
=
helper
.
getView
(
R
.
id
.
arv_num
);
nrcNum
.
setMaxNum
(
item
.
getCanOutStoreProductSum
());
nrcNum
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
...
...
app/src/main/java/com/wd/workoffice/ui/fg/PickApplyFragment.java
0 → 100644
浏览文件 @
d110c987
package
com
.
wd
.
workoffice
.
ui
.
fg
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.TextView
;
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.SendApplyBean
;
import
com.wd.workoffice.bean.event.CheckSendEvent
;
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.ui.activity.bat.order.PickApplyDetailActivity
;
import
com.wd.workoffice.ui.activity.bat.order.SendApplyDetailActivity
;
import
com.wd.workoffice.ui.adapter.SendApplyAdapter
;
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.appcompat.app.AlertDialog
;
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.Observable
;
import
io.reactivex.disposables.Disposable
;
/**
* 领料申请列表
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
PickApplyFragment
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
SendApplyAdapter
dataAdapter
;
private
List
<
SendApplyBean
.
RecordsBean
>
dataList
;
private
String
orderId
;
private
String
orderType
;
@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
);
param
.
put
(
"orderId"
,
orderId
);
page
=
1
;
param
.
put
(
"current"
,
page
);
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
SendApplyAdapter
(
R
.
layout
.
item_send_apply
,
dataList
,
Integer
.
valueOf
(
state
));
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvData
);
getData
();
changePermission
();
}
private
void
changePermission
()
{
boolean
hasPermission
=
true
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
hasPermission
=
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_PICK_APPLY_LIST
.
getPermission
())
&&
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_PICK_APPLY_AUDIT
.
getPermission
());
}
// else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
// hasPermission = WorkUtils.hasPermission(PagePermissionType.PO_OUT_AUDIT.getPermission());
// } else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
// hasPermission = WorkUtils.hasPermission(PagePermissionType.CO_OUT_AUDIT.getPermission());
// }
dataAdapter
.
setHasPermission
(
hasPermission
);
dataAdapter
.
notifyDataSetChanged
();
}
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Bundle
arguments
=
getArguments
();
if
(
arguments
!=
null
)
{
state
=
arguments
.
getString
(
"state"
);
orderId
=
arguments
.
getString
(
"orderId"
);
orderType
=
arguments
.
getString
(
"orderType"
);
}
}
private
void
getData
()
{
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
pickApplyList
(
param
);
}
else
{
observable
=
RtfUtils
.
getRtf
().
pickApplyList
(
param
);
}
// else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
// observable = RtfUtils.getRtf().sendPoApplyList(param);
// } else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
// observable = RtfUtils.getRtf().sendCoApplyList(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
;
}
List
<
SendApplyBean
.
RecordsBean
>
getList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
SendApplyBean
.
class
).
getRecords
();
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
(
PickApplyDetailActivity
.
class
,
"orderType"
,
orderType
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)));
}
});
dataAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_refuse
:
checkDialog
(
2
,
dataList
.
get
(
position
).
getId
());
break
;
case
R
.
id
.
tv_agree
:
checkDialog
(
1
,
dataList
.
get
(
position
).
getId
());
break
;
}
}
});
}
private
void
checkDialog
(
int
status
,
int
id
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
getActivity
());
View
view
=
LayoutInflater
.
from
(
getActivity
()).
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
);
WorkUtils
.
addNumListener
(
etRemark
,
tvNum
);
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
status
!=
1
&&
TextUtils
.
isEmpty
(
etRemark
.
getText
().
toString
()))
{
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
(
"status"
,
status
);
param
.
put
(
"auditRemark"
,
remark
);
param
.
put
(
"id"
,
id
);
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
observable
=
RtfUtils
.
getRtf
().
pickApplyCheck
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
observable
=
RtfUtils
.
getRtf
().
pickApplyCheck
(
WorkUtils
.
convertMapToBody
(
param
));
}
// else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
// observable = RtfUtils.getRtf().sendPoApplyCheck(WorkUtils.convertMapToBody(param));
// } else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
// observable = RtfUtils.getRtf().sendCoApplyCheck(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
CheckSendEvent
());
}
});
}
@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
(
CheckSendEvent
event
)
{
page
=
1
;
param
.
put
(
"current"
,
page
);
getData
();
}
}
app/src/main/res/layout/activity_add_stock_apply_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_bat_retrun_detail.xml
浏览文件 @
d110c987
...
...
@@ -28,7 +28,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"拒绝"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_crucible_order.xml
浏览文件 @
d110c987
...
...
@@ -28,7 +28,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
...
...
@@ -71,7 +71,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -82,7 +82,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_device_buy_detail.xml
浏览文件 @
d110c987
...
...
@@ -40,7 +40,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -51,7 +51,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_end_apply_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_financial_detail.xml
浏览文件 @
d110c987
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_inside_order.xml
浏览文件 @
d110c987
...
...
@@ -28,7 +28,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"拒绝"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
...
...
@@ -39,7 +38,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
...
...
@@ -71,7 +70,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -82,7 +81,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_mes_service_check_detail.xml
浏览文件 @
d110c987
...
...
@@ -21,7 +21,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
app/src/main/res/layout/activity_mes_service_detail.xml
浏览文件 @
d110c987
...
...
@@ -32,7 +32,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_out_order.xml
浏览文件 @
d110c987
...
...
@@ -28,7 +28,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"拒绝"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
...
...
@@ -40,7 +39,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
...
...
@@ -72,7 +71,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -83,7 +82,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_product_apply_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_sale_order.xml
浏览文件 @
d110c987
...
...
@@ -28,7 +28,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"拒绝"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
...
...
@@ -39,7 +38,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
...
...
@@ -71,7 +70,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -82,7 +81,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_send_apply_add.xml
浏览文件 @
d110c987
...
...
@@ -67,6 +67,7 @@
android:background=
"@color/red_btn_bg"
/>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
...
...
@@ -141,6 +142,7 @@
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_logistics_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
...
...
@@ -171,6 +173,7 @@
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_logistics_code"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
...
...
app/src/main/res/layout/activity_send_apply_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_supplier_order.xml
浏览文件 @
d110c987
...
...
@@ -28,7 +28,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"拒绝"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
...
...
@@ -39,7 +38,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
...
...
@@ -49,10 +48,10 @@
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:visibility=
"gone"
android:layout_alignParentBottom=
"true"
android:gravity=
"center_vertical|right"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<LinearLayout
android:id=
"@+id/ll_check"
...
...
@@ -71,7 +70,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -82,7 +81,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意"
android:text=
"
通过
android:textColor="
@color/white"
/>
</LinearLayout>
...
...
@@ -147,6 +146,40 @@
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<FrameLayout
android:id=
"@+id/fl_pick_apply"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:tag=
"order:fo:pick-apply:page:list"
>
<TextView
android:id=
"@+id/tv_pick_apply"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@drawable/shape_blue_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"申请领料"
android:textColor=
"@color/white"
/>
<View
android:id=
"@+id/view_pick_apply"
android:layout_width=
"8mm"
android:layout_height=
"8mm"
android:layout_gravity=
"right"
android:background=
"@drawable/shape_red_circle"
android:visibility=
"gone"
/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
...
...
@@ -169,6 +202,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
/>
<LinearLayout
android:id=
"@+id/ll_see_more"
android:layout_width=
"match_parent"
...
...
@@ -186,6 +220,7 @@
android:layout_height=
"15mm"
android:src=
"@mipmap/arrow_down"
/>
</LinearLayout>
<View
style=
"@style/ViewX"
/>
<LinearLayout
...
...
@@ -211,10 +246,10 @@
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10mm"
android:paddingBottom=
"20mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
>
android:paddingHorizontal=
"20mm"
android:paddingBottom=
"20mm"
>
<RelativeLayout
...
...
@@ -243,9 +278,10 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:paddingVertical=
"10mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:paddingVertical=
"10mm"
>
<RelativeLayout
android:id=
"@+id/rl_dep"
android:layout_width=
"match_parent"
...
...
@@ -370,6 +406,7 @@
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -394,6 +431,7 @@
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -450,6 +488,7 @@
</LinearLayout>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/activity_use_apply_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_work_financial_out_detail.xml
浏览文件 @
d110c987
...
...
@@ -19,7 +19,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -30,7 +30,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_work_financial_ticket_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/activity_work_logistics_detail.xml
浏览文件 @
d110c987
...
...
@@ -20,7 +20,7 @@
android:background=
"@drawable/shape_red_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
/>
<TextView
...
...
@@ -31,7 +31,7 @@
android:background=
"@drawable/shape_green_btn"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"5mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
app/src/main/res/layout/item_financial_out.xml
浏览文件 @
d110c987
...
...
@@ -179,7 +179,7 @@
android:id=
"@+id/btn_refuse"
android:layout_width=
"wrap_content"
android:layout_height=
"30mm"
android:text=
"
拒绝
"
android:text=
"
驳回
"
android:textColor=
"@color/white"
android:background=
"@drawable/shape_blue_btn"
/>
...
...
@@ -187,7 +187,7 @@
android:id=
"@+id/btn_agree"
android:layout_width=
"wrap_content"
android:layout_height=
"30mm"
android:text=
"
同意
"
android:text=
"
通过
"
android:layout_marginLeft=
"10mm"
android:textColor=
"@color/white"
android:background=
"@drawable/shape_blue_btn"
/>
...
...
app/src/main/res/layout/item_pick_add.xml
0 → 100644
浏览文件 @
d110c987
<?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:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingTop=
"10mm"
android:paddingBottom=
"20mm"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5mm"
android:gravity=
"center_vertical"
>
<CheckBox
android:id=
"@+id/cb_check"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:padding=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品名"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"规格"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_spec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"内部单价"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"单位"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_unit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"可使用数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_apply_send_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_send_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"已使用:0"
/>
<TextView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:gravity=
"right"
android:layout_height=
"wrap_content"
android:text=
"本次使用数"
/>
<com.wd.workoffice.widget.AddAndReduceView
android:id=
"@+id/arv_num"
android:layout_width=
"130mm"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5mm"
android:layout_gravity=
"right"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论