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
2fde70bc
提交
2fde70bc
authored
4月 06, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.开票新增,开票审核
2.//TODO erp用户激活测试,忘记/重置密码测试,回款付款测试,产品下单还差附件,mes,消息,刷新token
上级
75dfafec
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
1139 行增加
和
114 行删除
+1139
-114
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+17
-1
OrderType.java
.../main/java/com/wd/workoffice/bean/workEnum/OrderType.java
+1
-4
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+95
-13
StoreSaleClientActivity.java
...office/ui/activity/bat/store/StoreSaleClientActivity.java
+20
-7
WorkChooseProductActivity.java
...ffice/ui/activity/bat/work/WorkChooseProductActivity.java
+52
-4
WorkFinancialReceiveTicketAddActivity.java
...ivity/bat/work/WorkFinancialReceiveTicketAddActivity.java
+32
-16
WorkFinancialReceiveTicketDetailActivity.java
...ty/bat/work/WorkFinancialReceiveTicketDetailActivity.java
+5
-4
WorkFinancialReceiveTicketSubmitActivity.java
...ty/bat/work/WorkFinancialReceiveTicketSubmitActivity.java
+185
-0
WorkFinancialTicketAddActivity.java
.../ui/activity/bat/work/WorkFinancialTicketAddActivity.java
+28
-5
WorkFinancialTicketDetailActivity.java
.../activity/bat/work/WorkFinancialTicketDetailActivity.java
+5
-5
WorkFinancialTicketSubmitActivity.java
.../activity/bat/work/WorkFinancialTicketSubmitActivity.java
+191
-0
WorkAddTicketOrderAdapter.java
...m/wd/workoffice/ui/adapter/WorkAddTicketOrderAdapter.java
+13
-2
activity_bat_sale_client.xml
app/src/main/res/layout/activity_bat_sale_client.xml
+1
-1
activity_open_ticket_add.xml
app/src/main/res/layout/activity_open_ticket_add.xml
+36
-25
activity_open_ticket_submit.xml
app/src/main/res/layout/activity_open_ticket_submit.xml
+211
-0
activity_receive_ticket_add.xml
app/src/main/res/layout/activity_receive_ticket_add.xml
+35
-27
activity_receive_ticket_submit.xml
app/src/main/res/layout/activity_receive_ticket_submit.xml
+211
-0
item_ticket_add_detail.xml
app/src/main/res/layout/item_ticket_add_detail.xml
+1
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
2fde70bc
...
@@ -699,7 +699,7 @@
...
@@ -699,7 +699,7 @@
<activity
<activity
android:name=
".ui.activity.bat.work.WorkFinancialReceiveTicketAddActivity"
android:name=
".ui.activity.bat.work.WorkFinancialReceiveTicketAddActivity"
android:configChanges=
"keyboardHidden|orientation"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"
开
票"
android:label=
"
收
票"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:theme=
"@style/Work.Base"
...
@@ -720,6 +720,22 @@
...
@@ -720,6 +720,22 @@
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.work.WorkFinancialTicketSubmitActivity"
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.work.WorkFinancialReceiveTicketSubmitActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"收票申请"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
<provider
android:name=
"androidx.core.content.FileProvider"
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/bean/workEnum/OrderType.java
浏览文件 @
2fde70bc
package
com
.
wd
.
workoffice
.
bean
.
workEnum
;
package
com
.
wd
.
workoffice
.
bean
.
workEnum
;
import
java.util.Arrays
;
import
java.util.List
;
/**
/**
* author : flexible
* author : flexible
* email : lgd19940421@163.com
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
* github: https://github.com/FlexibleXd
**/
**/
public
enum
OrderType
{
public
enum
OrderType
{
ALL
(
"全部类型"
,
""
),
SALE
(
"销售订单"
,
"SO"
),
OUT_BUY
(
"外采购
流程
"
,
"PO"
),
ALL
(
"全部类型"
,
""
),
SALE
(
"销售订单"
,
"SO"
),
OUT_BUY
(
"外采购
订单
"
,
"PO"
),
SUPPLIER
(
"供应订单"
,
"FO"
),
CRUCIBLE
(
"坩埚订单"
,
"CO"
),
IN
(
"内部交易订单"
,
"IO"
),
SUPPLIER
(
"供应订单"
,
"FO"
),
CRUCIBLE
(
"坩埚订单"
,
"CO"
),
IN
(
"内部交易订单"
,
"IO"
),
BUILD
(
"组装订单"
,
"AO"
);
BUILD
(
"组装订单"
,
"AO"
);
...
...
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
2fde70bc
...
@@ -522,48 +522,100 @@ public interface ApiService {
...
@@ -522,48 +522,100 @@ public interface ApiService {
*
*
* @return
* @return
*/
*/
@
GE
T
(
"/invoiceApply/so/exam"
)
@
PU
T
(
"/invoiceApply/so/exam"
)
Observable
<
BaseBean
>
soExam
(
@
QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
soExam
(
@
Body
RequestBody
requestBody
);
/**
/**
* ao开票审核
* ao开票审核
*
*
* @return
* @return
*/
*/
@
GE
T
(
"/invoiceApply/ao/exam"
)
@
PU
T
(
"/invoiceApply/ao/exam"
)
Observable
<
BaseBean
>
aoExam
(
@
QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
aoExam
(
@
Body
RequestBody
requestBody
);
/**
/**
*
a
o开票审核
*
p
o开票审核
*
*
* @return
* @return
*/
*/
@
GE
T
(
"/invoiceApply/po/exam"
)
@
PU
T
(
"/invoiceApply/po/exam"
)
Observable
<
BaseBean
>
poExam
(
@
QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
poExam
(
@
Body
RequestBody
requestBody
);
/**
/**
* co开票审核
* co开票审核
*
*
* @return
* @return
*/
*/
@
GE
T
(
"/invoiceApply/co/exam"
)
@
PU
T
(
"/invoiceApply/co/exam"
)
Observable
<
BaseBean
>
coExam
(
@
QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
coExam
(
@
Body
RequestBody
requestBody
);
/**
/**
* Fo收票审核
* Fo收票审核
*
*
* @return
* @return
*/
*/
@
GE
T
(
"/receiptInvoiceApply/fo/exam"
)
@
PU
T
(
"/receiptInvoiceApply/fo/exam"
)
Observable
<
BaseBean
>
receiveFoExam
(
@
QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
receiveFoExam
(
@
Body
RequestBody
requestBody
);
/**
/**
* po收票审核
* po收票审核
*
*
* @return
* @return
*/
*/
@GET
(
"/receiptInvoiceApply/po/exam"
)
@PUT
(
"/receiptInvoiceApply/po/exam"
)
Observable
<
BaseBean
>
receivePoExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
receivePoExam
(
@Body
RequestBody
requestBody
);
/**
* so开票申请
*
* @return
*/
@POST
(
"/invoiceApply/so"
)
Observable
<
BaseBean
>
soApply
(
@Body
RequestBody
requestBody
);
/**
* fo开票申请
*
* @return
*/
@POST
(
"/invoiceApply/ao"
)
Observable
<
BaseBean
>
aoApply
(
@Body
RequestBody
requestBody
);
/**
* po开票申请
*
* @return
*/
@POST
(
"/invoiceApply/po"
)
Observable
<
BaseBean
>
poApply
(
@Body
RequestBody
requestBody
);
/**
* co开票申请
*
* @return
*/
@POST
(
"/invoiceApply/co"
)
Observable
<
BaseBean
>
coApply
(
@Body
RequestBody
requestBody
);
/**
* fo开票申请
*
* @return
*/
@POST
(
"/receiptInvoiceApply/fo"
)
Observable
<
BaseBean
>
foReceipApply
(
@Body
RequestBody
requestBody
);
/**
* po开票申请
*
* @return
*/
@POST
(
"/receiptInvoiceApply/po"
)
Observable
<
BaseBean
>
poReceiptApply
(
@Body
RequestBody
requestBody
);
/**
/**
* 外采购收票分页列表
* 外采购收票分页列表
...
@@ -739,6 +791,7 @@ public interface ApiService {
...
@@ -739,6 +791,7 @@ public interface ApiService {
@POST
(
"/moneyPayApply/apply"
)
@POST
(
"/moneyPayApply/apply"
)
Observable
<
BaseBean
>
moneyPayApply
(
@Body
RequestBody
requestBody
);
Observable
<
BaseBean
>
moneyPayApply
(
@Body
RequestBody
requestBody
);
/**
/**
* 为开票查询的订单
* 为开票查询的订单
* customerId
* customerId
...
@@ -761,6 +814,9 @@ public interface ApiService {
...
@@ -761,6 +814,9 @@ public interface ApiService {
@GET
(
"/package-order/item/page/list"
)
@GET
(
"/package-order/item/page/list"
)
Observable
<
BaseBean
>
packageTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
packageTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
/**
* 为外采购查询的订单
* 为外采购查询的订单
* customerId
* customerId
...
@@ -784,4 +840,30 @@ public interface ApiService {
...
@@ -784,4 +840,30 @@ public interface ApiService {
@GET
(
"/crucibleSaleOrder/forInvoice"
)
@GET
(
"/crucibleSaleOrder/forInvoice"
)
Observable
<
BaseBean
>
crucibleTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
crucibleTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 外采购订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET
(
"/purchaseOrder/item/page/list"
)
Observable
<
BaseBean
>
purchaseOutTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 供应订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET
(
"/supplierOrder/item/page/list"
)
Observable
<
BaseBean
>
supplierTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/store/StoreSaleClientActivity.java
浏览文件 @
2fde70bc
...
@@ -66,8 +66,13 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
...
@@ -66,8 +66,13 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
clientList
=
new
ArrayList
<>();
clientList
=
new
ArrayList
<>();
clientAdapter
=
new
StoreClientAdapter
(
R
.
layout
.
item_store_client
,
clientList
);
clientAdapter
=
new
StoreClientAdapter
(
R
.
layout
.
item_store_client
,
clientList
);
clientAdapter
.
bindToRecyclerView
(
rvClient
);
clientAdapter
.
bindToRecyclerView
(
rvClient
);
clientAdapter
.
setEmptyView
(
R
.
layout
.
view_empty_content
,
rvClient
);
param
=
WorkUtils
.
pageKey
();
param
=
WorkUtils
.
pageKey
();
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"flag"
)))
{
param
.
put
(
"partTypeCode"
,
getIntent
().
getStringExtra
(
"code"
));
param
.
put
(
"partTypeCode"
,
getIntent
().
getStringExtra
(
"code"
));
}
else
{
param
.
put
(
"searchType"
,
getIntent
().
getStringExtra
(
"code"
));
}
getData
();
getData
();
}
}
...
@@ -76,7 +81,7 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
...
@@ -76,7 +81,7 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"flag"
)))
{
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"flag"
)))
{
observable
=
RtfUtils
.
getRtf
().
getClient
(
param
);
observable
=
RtfUtils
.
getRtf
().
getClient
(
param
);
}
else
{
}
else
{
// param.put("dep
Id", UserKeeper.getInstance().getUserDepId(
));
// param.put("dep
tId", getIntent().getStringExtra("depId"
));
observable
=
RtfUtils
.
getRtf
().
getClientOut
(
param
);
observable
=
RtfUtils
.
getRtf
().
getClientOut
(
param
);
}
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
...
@@ -97,13 +102,10 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
...
@@ -97,13 +102,10 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
toast
(
data
.
getMessage
());
toast
(
data
.
getMessage
());
return
;
return
;
}
}
List
<
ClientBean
.
RecordsBean
>
dataList
=
new
ArrayList
<>();
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"flag"
)))
{
ClientBean
clientBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
ClientBean
.
class
);
ClientBean
clientBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
ClientBean
.
class
);
List
<
ClientBean
.
RecordsBean
>
dataList
;
dataList
.
addAll
(
clientBean
.
getRecords
());
if
(
clientBean
==
null
)
{
dataList
=
new
ArrayList
<>();
}
else
{
dataList
=
clientBean
.
getRecords
();
}
if
(
page
==
1
)
{
if
(
page
==
1
)
{
clientList
.
clear
();
clientList
.
clear
();
clientList
.
addAll
(
dataList
);
clientList
.
addAll
(
dataList
);
...
@@ -119,6 +121,17 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
...
@@ -119,6 +121,17 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
}
else
{
}
else
{
page
++;
page
++;
}
}
}
else
{
dataList
.
addAll
(
JSON
.
parseArray
(
data
.
getData
().
toString
(),
ClientBean
.
RecordsBean
.
class
));
clientAdapter
.
loadMoreEnd
();
clientList
.
clear
();
clientList
.
addAll
(
dataList
);
clientAdapter
.
notifyDataSetChanged
();
}
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"flag"
)))
{
}
toast
(
"搜索成功"
);
}
}
});
});
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkChooseProductActivity.java
浏览文件 @
2fde70bc
...
@@ -17,6 +17,7 @@ import com.wd.workoffice.app.WorkToolBarActivity;
...
@@ -17,6 +17,7 @@ import com.wd.workoffice.app.WorkToolBarActivity;
import
com.wd.workoffice.bean.ProPriceBean
;
import
com.wd.workoffice.bean.ProPriceBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.TicketDetailBean
;
import
com.wd.workoffice.bean.TicketDetailBean
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity
;
...
@@ -24,6 +25,9 @@ import com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter;
...
@@ -24,6 +25,9 @@ import com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -100,6 +104,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
...
@@ -100,6 +104,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
clientList
.
get
(
position
).
setCarPrice
(
etPrice
.
getText
().
toString
());
clientList
.
get
(
position
).
setCarPrice
(
etPrice
.
getText
().
toString
());
clientAdapter
.
notifyItemChanged
(
position
);
clientAdapter
.
notifyItemChanged
(
position
);
addCart
(
data
,
num
.
getNumber
(),
etPrice
.
getText
().
toString
());
addCart
(
data
,
num
.
getNumber
(),
etPrice
.
getText
().
toString
());
tvNum
.
setText
(
"共 "
.
concat
(
clientList
.
size
()
+
""
).
concat
(
" 件"
));
addCartDialog
.
dismiss
();
addCartDialog
.
dismiss
();
}
}
});
});
...
@@ -143,13 +148,20 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
...
@@ -143,13 +148,20 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
param
=
WorkUtils
.
pageKey
();
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"current"
,
1
);
param
.
put
(
"current"
,
1
);
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"supplier"
)))
{
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"launchDeptId"
,
getIntent
().
getStringExtra
(
"depId"
));
param
.
put
(
"launchDeptId"
,
getIntent
().
getStringExtra
(
"depId"
));
}
else
{
param
.
put
(
"supplierId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"depId"
));
}
getData
();
getData
();
}
}
private
void
getData
()
{
private
void
getData
()
{
Observable
<
BaseBean
>
observable
;
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"supplier"
)))
{
if
(
TextUtils
.
equals
(
"销售订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
if
(
TextUtils
.
equals
(
"销售订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
observable
=
RtfUtils
.
getRtf
().
saleTicketOrder
(
param
);
observable
=
RtfUtils
.
getRtf
().
saleTicketOrder
(
param
);
}
else
if
(
TextUtils
.
equals
(
"组装订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
}
else
if
(
TextUtils
.
equals
(
"组装订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
...
@@ -159,6 +171,15 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
...
@@ -159,6 +171,15 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
}
else
{
}
else
{
observable
=
RtfUtils
.
getRtf
().
crucibleTicketOrder
(
param
);
observable
=
RtfUtils
.
getRtf
().
crucibleTicketOrder
(
param
);
}
}
}
else
{
if
(
TextUtils
.
equals
(
"供应订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
observable
=
RtfUtils
.
getRtf
().
supplierTicketOrder
(
param
);
}
else
if
(
TextUtils
.
equals
(
"外采购订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
observable
=
RtfUtils
.
getRtf
().
purchaseOutTicketOrder
(
param
);
}
else
{
observable
=
RtfUtils
.
getRtf
().
supplierTicketOrder
(
param
);
}
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
public
void
doOnSubscribe
(
Disposable
d
)
{
...
@@ -210,7 +231,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
...
@@ -210,7 +231,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
clientAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
clientAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
openDialog
(
clientList
.
get
(
position
),
position
);
openDialog
(
clientList
.
get
(
position
),
position
);
}
}
});
});
}
}
...
@@ -229,9 +250,19 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
...
@@ -229,9 +250,19 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
toast
(
"购物车没有产品"
);
toast
(
"购物车没有产品"
);
return
;
return
;
}
}
startActivity
(
StoreSaleCarActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
carList
),
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"supplier"
)))
{
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"customerId"
,
getIntent
().
getStringExtra
(
"transitPartId"
),
startActivity
(
WorkFinancialTicketSubmitActivity
.
class
,
"orderType"
,
getIntent
().
getStringExtra
(
"orderType"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"depId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
));
"depId"
,
getIntent
().
getStringExtra
(
"depId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"customerName"
,
getIntent
().
getStringExtra
(
"customerName"
),
"info"
,
JSON
.
toJSONString
(
carList
));
}
else
{
startActivity
(
WorkFinancialReceiveTicketSubmitActivity
.
class
,
"orderType"
,
getIntent
().
getStringExtra
(
"orderType"
),
"depId"
,
getIntent
().
getStringExtra
(
"depId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"customerName"
,
getIntent
().
getStringExtra
(
"customerName"
),
"info"
,
JSON
.
toJSONString
(
carList
));
}
break
;
break
;
case
R
.
id
.
btn_search
:
case
R
.
id
.
btn_search
:
param
.
put
(
"name"
,
etKey
.
getText
().
toString
());
param
.
put
(
"name"
,
etKey
.
getText
().
toString
());
...
@@ -241,4 +272,21 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
...
@@ -241,4 +272,21 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
break
;
break
;
}
}
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
CheckTicketEvent
event
)
{
finish
();
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialReceiveTicketAddActivity.java
浏览文件 @
2fde70bc
...
@@ -4,16 +4,21 @@ import android.content.DialogInterface;
...
@@ -4,16 +4,21 @@ import android.content.DialogInterface;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.Map
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
...
@@ -33,15 +38,15 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
...
@@ -33,15 +38,15 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
@BindView
(
R
.
id
.
tv_order
)
@BindView
(
R
.
id
.
tv_order
)
TextView
tvOrder
;
TextView
tvOrder
;
@BindView
(
R
.
id
.
rl_order
)
@BindView
(
R
.
id
.
rl_order
)
Relative
Layout
rlOrder
;
Linear
Layout
rlOrder
;
@BindView
(
R
.
id
.
tv_dep
)
@BindView
(
R
.
id
.
tv_dep
)
TextView
tvDep
;
TextView
tvDep
;
@BindView
(
R
.
id
.
rl_dep
)
@BindView
(
R
.
id
.
rl_dep
)
Relative
Layout
rlDep
;
Linear
Layout
rlDep
;
@BindView
(
R
.
id
.
tv_client
)
@BindView
(
R
.
id
.
tv_client
)
TextView
tvClient
;
TextView
tvClient
;
@BindView
(
R
.
id
.
rl_client
)
@BindView
(
R
.
id
.
rl_client
)
Relative
Layout
rlClient
;
Linear
Layout
rlClient
;
private
Map
<
String
,
Object
>
param
;
private
Map
<
String
,
Object
>
param
;
private
Integer
clientId
;
private
Integer
clientId
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
...
@@ -82,7 +87,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
...
@@ -82,7 +87,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
@Override
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
1000
1
&&
resultCode
==
10001
)
{
if
(
requestCode
==
1000
2
&&
resultCode
==
10002
)
{
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
tvClient
.
setText
(
clientName
);
tvClient
.
setText
(
clientName
);
...
@@ -93,12 +98,10 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
...
@@ -93,12 +98,10 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
}
}
}
}
@OnClick
({
R
.
id
.
tv_next
,
R
.
id
.
rl_order
,
R
.
id
.
rl_dep
,
R
.
id
.
rl_client
})
@OnClick
({
R
.
id
.
tv_next
,
R
.
id
.
rl_order
,
R
.
id
.
rl_dep
,
R
.
id
.
rl_client
})
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_next
:
case
R
.
id
.
tv_next
:
if
(
TextUtils
.
isEmpty
(
chooseType
))
{
if
(
TextUtils
.
isEmpty
(
chooseType
))
{
toast
(
"请选择订单类别"
);
toast
(
"请选择订单类别"
);
return
;
return
;
...
@@ -108,16 +111,12 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
...
@@ -108,16 +111,12 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
return
;
return
;
}
}
if
(
clientId
==
null
)
{
if
(
clientId
==
null
)
{
toast
(
"请先选择
客户
"
);
toast
(
"请先选择
供应商
"
);
return
;
return
;
}
}
startActivity
(
WorkChooseProductActivity
.
class
,
// param.put("process", PermissionType.);
"orderType"
,
tvOrder
.
getText
().
toString
(),
"supplier"
,
"选择供应商"
,
"depId"
,
depId
+
""
,
"customerId"
,
clientId
+
""
,
// param.put("applyRemark", etRemark.getText().toString());
"customerName"
,
tvClient
.
getText
().
toString
());
// param.put("applyDept", UserKeeper.getInstance().getUserDepId());
// param.put("orderType", chooseType);
// param.put("applyAmount", etPrice.getText().toString());
startActivity
(
StoreSaleClientActivity
.
class
);
break
;
break
;
case
R
.
id
.
rl_order
:
case
R
.
id
.
rl_order
:
typeDialog
.
show
();
typeDialog
.
show
();
...
@@ -126,9 +125,26 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
...
@@ -126,9 +125,26 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
startActivityForResult
(
WorkChooseDepActivity
.
class
,
10003
);
startActivityForResult
(
WorkChooseDepActivity
.
class
,
10003
);
break
;
break
;
case
R
.
id
.
rl_client
:
case
R
.
id
.
rl_client
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
1000
1
,
startActivityForResult
(
StoreSaleClientActivity
.
class
,
1000
2
,
"
code"
,
"SUPPLIER"
,
"supplier"
,
"选择供应商"
);
"
depId"
,
depId
+
""
,
"flag"
,
"1"
,
"code"
,
"SUPPLIER"
,
"supplier"
,
"选择供应商"
);
break
;
break
;
}
}
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
CheckTicketEvent
event
)
{
finish
();
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialReceiveTicketDetailActivity.java
浏览文件 @
2fde70bc
...
@@ -20,6 +20,7 @@ import com.wd.workoffice.bean.event.CheckTicketEvent;
...
@@ -20,6 +20,7 @@ import com.wd.workoffice.bean.event.CheckTicketEvent;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.WorkFinancialTicketDetailAdapter
;
import
com.wd.workoffice.ui.adapter.WorkFinancialTicketDetailAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -91,7 +92,7 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
...
@@ -91,7 +92,7 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
dataAdapter
=
new
WorkFinancialTicketDetailAdapter
(
R
.
layout
.
item_ticket_detail
,
dataList
);
dataAdapter
=
new
WorkFinancialTicketDetailAdapter
(
R
.
layout
.
item_ticket_detail
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
new
HashMap
<>();
param
=
new
HashMap
<>();
param
.
put
(
"id"
,
getIntent
().
getStringExtra
(
"id"
));
param
.
put
(
"id"
,
info
.
getId
(
));
orderType
=
getIntent
().
getStringExtra
(
"type"
);
orderType
=
getIntent
().
getStringExtra
(
"type"
);
}
}
...
@@ -198,11 +199,11 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
...
@@ -198,11 +199,11 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
param
.
put
(
"auditRemark"
,
remark
);
param
.
put
(
"auditRemark"
,
remark
);
Observable
<
BaseBean
>
baseBeanObservable
;
Observable
<
BaseBean
>
baseBeanObservable
;
if
(
TextUtils
.
equals
(
orderType
,
"供应订单"
))
{
if
(
TextUtils
.
equals
(
orderType
,
"供应订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
receiveFoExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
receiveFoExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
"外采购订单"
))
{
}
else
if
(
TextUtils
.
equals
(
orderType
,
"外采购订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
receivePoExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
receivePoExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
else
{
}
else
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
receiveFoExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
receiveFoExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
}
baseBeanObservable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
baseBeanObservable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialReceiveTicketSubmitActivity.java
0 → 100644
浏览文件 @
2fde70bc
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
work
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter
;
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.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
WorkFinancialReceiveTicketSubmitActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_bottom
)
TextView
tvBottom
;
@BindView
(
R
.
id
.
tv_desc
)
TextView
tvDesc
;
@BindView
(
R
.
id
.
tv_client
)
TextView
tvClient
;
@BindView
(
R
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
et_tax
)
EditText
etTax
;
@BindView
(
R
.
id
.
et_remark
)
EditText
etRemark
;
@BindView
(
R
.
id
.
tv_remark_num
)
TextView
tvRemarkNum
;
private
List
<
TicketAddBean
.
RecordsBean
>
dataList
;
private
WorkAddTicketOrderAdapter
dataAdapter
;
private
Map
<
String
,
Object
>
param
;
private
String
orderType
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
tvDesc
.
setText
(
"所属供应商"
);
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
tvClient
.
setText
(
getIntent
().
getStringExtra
(
"customerName"
));
dataList
=
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"info"
),
TicketAddBean
.
RecordsBean
.
class
);
dataAdapter
=
new
WorkAddTicketOrderAdapter
(
R
.
layout
.
item_ticket_add_detail
,
dataList
,
1
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
new
HashMap
<>();
param
.
put
(
"supplierId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"deptId"
,
getIntent
().
getStringExtra
(
"depId"
));
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
changeNumAndPrice
();
coverProInfo
(
dataList
);
}
@Override
protected
void
initEvent
()
{
etRemark
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
tvRemarkNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_open_ticket_submit
;
}
/**
* 转换pro,生成上传参数
*
* @param proList
* @return
*/
private
void
coverProInfo
(
List
<
TicketAddBean
.
RecordsBean
>
proList
)
{
List
<
JSONObject
>
orderItems
=
new
ArrayList
<>();
for
(
TicketAddBean
.
RecordsBean
recordsBean
:
proList
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
"productId"
,
recordsBean
.
getProductId
());
data
.
put
(
"orderId"
,
recordsBean
.
getOrderId
());
data
.
put
(
"quantity"
,
recordsBean
.
getCarNum
());
data
.
put
(
"invoiceUnitPrice"
,
recordsBean
.
getCarPrice
());
// data.put("outProductName", recordsBean.getoutpr());
orderItems
.
add
(
data
);
}
param
.
put
(
"invoiceApplyItems"
,
orderItems
);
}
private
void
changeNumAndPrice
()
{
String
allPrice
=
""
;
for
(
TicketAddBean
.
RecordsBean
recordsBean
:
dataList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getCarPrice
(),
2
),
2
);
}
tvPrice
.
setText
(
" ¥ "
.
concat
(
allPrice
));
}
private
void
submit
()
{
param
.
put
(
"tax"
,
etTax
.
getText
().
toString
());
param
.
put
(
"applyRemark"
,
etRemark
.
getText
().
toString
());
Observable
<
BaseBean
>
baseBeanObservable
;
if
(
TextUtils
.
equals
(
orderType
,
"外采购订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
poReceiptApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
orderType
,
"销售订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
foReceipApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
poReceiptApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
baseBeanObservable
.
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
CheckTicketEvent
());
finish
();
}
});
}
@OnClick
(
R
.
id
.
tv_bottom
)
public
void
onViewClicked
()
{
if
(
TextUtils
.
isEmpty
(
etTax
.
getText
().
toString
()))
{
toast
(
"请输入税费"
);
return
;
}
submit
();
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialTicketAddActivity.java
浏览文件 @
2fde70bc
...
@@ -4,17 +4,22 @@ import android.content.DialogInterface;
...
@@ -4,17 +4,22 @@ import android.content.DialogInterface;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.Map
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
...
@@ -34,15 +39,15 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
...
@@ -34,15 +39,15 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
@BindView
(
R
.
id
.
tv_order
)
@BindView
(
R
.
id
.
tv_order
)
TextView
tvOrder
;
TextView
tvOrder
;
@BindView
(
R
.
id
.
rl_order
)
@BindView
(
R
.
id
.
rl_order
)
Relative
Layout
rlOrder
;
Linear
Layout
rlOrder
;
@BindView
(
R
.
id
.
tv_dep
)
@BindView
(
R
.
id
.
tv_dep
)
TextView
tvDep
;
TextView
tvDep
;
@BindView
(
R
.
id
.
rl_dep
)
@BindView
(
R
.
id
.
rl_dep
)
Relative
Layout
rlDep
;
Linear
Layout
rlDep
;
@BindView
(
R
.
id
.
tv_client
)
@BindView
(
R
.
id
.
tv_client
)
TextView
tvClient
;
TextView
tvClient
;
@BindView
(
R
.
id
.
rl_client
)
@BindView
(
R
.
id
.
rl_client
)
Relative
Layout
rlClient
;
Linear
Layout
rlClient
;
private
Map
<
String
,
Object
>
param
;
private
Map
<
String
,
Object
>
param
;
private
Integer
clientId
;
private
Integer
clientId
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
...
@@ -112,7 +117,9 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
...
@@ -112,7 +117,9 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
toast
(
"请先选择客户"
);
toast
(
"请先选择客户"
);
return
;
return
;
}
}
startActivity
(
WorkChooseProductActivity
.
class
,
"orderType"
,
tvOrder
.
getText
().
toString
(),
"depId"
,
""
+
""
,
"customerId"
,
clientId
+
""
);
startActivity
(
WorkChooseProductActivity
.
class
,
"orderType"
,
tvOrder
.
getText
().
toString
(),
"depId"
,
depId
+
""
,
"customerId"
,
clientId
+
""
,
"customerName"
,
tvClient
.
getText
().
toString
());
break
;
break
;
case
R
.
id
.
rl_order
:
case
R
.
id
.
rl_order
:
typeDialog
.
show
();
typeDialog
.
show
();
...
@@ -122,8 +129,24 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
...
@@ -122,8 +129,24 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
break
;
break
;
case
R
.
id
.
rl_client
:
case
R
.
id
.
rl_client
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"code"
,
"CUSTOMER"
);
"
flag"
,
"1"
,
"
code"
,
"CUSTOMER"
);
break
;
break
;
}
}
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
CheckTicketEvent
event
)
{
finish
();
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialTicketDetailActivity.java
浏览文件 @
2fde70bc
...
@@ -92,7 +92,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
...
@@ -92,7 +92,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
dataAdapter
=
new
WorkFinancialTicketDetailAdapter
(
R
.
layout
.
item_ticket_detail
,
dataList
);
dataAdapter
=
new
WorkFinancialTicketDetailAdapter
(
R
.
layout
.
item_ticket_detail
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
new
HashMap
<>();
param
=
new
HashMap
<>();
param
.
put
(
"id"
,
getIntent
().
getStringExtra
(
"id"
));
param
.
put
(
"id"
,
info
.
getId
(
));
orderType
=
getIntent
().
getStringExtra
(
"type"
);
orderType
=
getIntent
().
getStringExtra
(
"type"
);
}
}
...
@@ -199,13 +199,13 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
...
@@ -199,13 +199,13 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
param
.
put
(
"auditRemark"
,
remark
);
param
.
put
(
"auditRemark"
,
remark
);
Observable
<
BaseBean
>
baseBeanObservable
;
Observable
<
BaseBean
>
baseBeanObservable
;
if
(
TextUtils
.
equals
(
orderType
,
"销售订单"
))
{
if
(
TextUtils
.
equals
(
orderType
,
"销售订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
soExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
soExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
"外采购订单"
))
{
}
else
if
(
TextUtils
.
equals
(
orderType
,
"外采购订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
poExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
poExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
"坩埚订单"
))
{
}
else
if
(
TextUtils
.
equals
(
orderType
,
"坩埚订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
coExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
coExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
else
{
}
else
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
aoExam
(
param
);
baseBeanObservable
=
RtfUtils
.
getRtf
().
aoExam
(
WorkUtils
.
convertMapToBody
(
param
)
);
}
}
baseBeanObservable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
baseBeanObservable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialTicketSubmitActivity.java
0 → 100644
浏览文件 @
2fde70bc
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
work
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter
;
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
WorkFinancialTicketSubmitActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_bottom
)
TextView
tvBottom
;
@BindView
(
R
.
id
.
tv_desc
)
TextView
tvDesc
;
@BindView
(
R
.
id
.
tv_client
)
TextView
tvClient
;
@BindView
(
R
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
et_tax
)
EditText
etTax
;
@BindView
(
R
.
id
.
et_remark
)
EditText
etRemark
;
@BindView
(
R
.
id
.
tv_remark_num
)
TextView
tvRemarkNum
;
private
List
<
TicketAddBean
.
RecordsBean
>
dataList
;
private
WorkAddTicketOrderAdapter
dataAdapter
;
private
Map
<
String
,
Object
>
param
;
private
String
orderType
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
tvClient
.
setText
(
getIntent
().
getStringExtra
(
"customerName"
));
dataList
=
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"info"
),
TicketAddBean
.
RecordsBean
.
class
);
dataAdapter
=
new
WorkAddTicketOrderAdapter
(
R
.
layout
.
item_ticket_add_detail
,
dataList
,
1
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
new
HashMap
<>();
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"deptId"
,
getIntent
().
getStringExtra
(
"depId"
));
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
changeNumAndPrice
();
coverProInfo
(
dataList
);
}
@Override
protected
void
initEvent
()
{
etRemark
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
tvRemarkNum
.
setText
(
s
.
length
()
+
"/140"
);
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_open_ticket_submit
;
}
/**
* 转换pro,生成上传参数
*
* @param proList
* @return
*/
private
void
coverProInfo
(
List
<
TicketAddBean
.
RecordsBean
>
proList
)
{
List
<
JSONObject
>
orderItems
=
new
ArrayList
<>();
for
(
TicketAddBean
.
RecordsBean
recordsBean
:
proList
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
"productId"
,
recordsBean
.
getProductId
());
data
.
put
(
"orderId"
,
recordsBean
.
getOrderId
());
data
.
put
(
"quantity"
,
recordsBean
.
getCarNum
());
data
.
put
(
"invoiceUnitPrice"
,
recordsBean
.
getCarPrice
());
// data.put("outProductName", recordsBean.getoutpr());
orderItems
.
add
(
data
);
}
param
.
put
(
"invoiceApplyItems"
,
orderItems
);
}
private
void
changeNumAndPrice
()
{
String
allPrice
=
""
;
for
(
TicketAddBean
.
RecordsBean
recordsBean
:
dataList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getCarPrice
(),
2
),
2
);
}
tvPrice
.
setText
(
" ¥ "
.
concat
(
allPrice
));
}
private
void
submit
()
{
param
.
put
(
"tax"
,
etTax
.
getText
().
toString
());
param
.
put
(
"applyRemark"
,
etRemark
.
getText
().
toString
());
Observable
<
BaseBean
>
baseBeanObservable
;
if
(
TextUtils
.
equals
(
orderType
,
"销售订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
soApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
orderType
,
"外采购订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
poApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
if
(
TextUtils
.
equals
(
orderType
,
"坩埚订单"
))
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
coApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
baseBeanObservable
=
RtfUtils
.
getRtf
().
aoApply
(
WorkUtils
.
convertMapToBody
(
param
));
}
baseBeanObservable
.
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
CheckTicketEvent
());
finish
();
}
});
}
@OnClick
(
R
.
id
.
tv_bottom
)
public
void
onViewClicked
()
{
if
(
TextUtils
.
isEmpty
(
etTax
.
getText
().
toString
()))
{
toast
(
"请输入税费"
);
return
;
}
submit
();
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/WorkAddTicketOrderAdapter.java
浏览文件 @
2fde70bc
...
@@ -10,25 +10,36 @@ import com.wd.workoffice.util.MathUtils;
...
@@ -10,25 +10,36 @@ import com.wd.workoffice.util.MathUtils;
import
java.util.List
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
/**
* Created by flexible on 2018/8/13.
* Created by flexible on 2018/8/13.
*/
*/
public
class
WorkAddTicketOrderAdapter
extends
BaseQuickAdapter
<
TicketAddBean
.
RecordsBean
,
BaseViewHolder
>
{
public
class
WorkAddTicketOrderAdapter
extends
BaseQuickAdapter
<
TicketAddBean
.
RecordsBean
,
BaseViewHolder
>
{
int
type
;
//0,add 1,submit
public
WorkAddTicketOrderAdapter
(
int
layoutResId
,
List
data
)
{
public
WorkAddTicketOrderAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
super
(
layoutResId
,
data
);
}
}
public
WorkAddTicketOrderAdapter
(
int
layoutResId
,
@Nullable
List
<
TicketAddBean
.
RecordsBean
>
data
,
int
type
)
{
super
(
layoutResId
,
data
);
this
.
type
=
type
;
}
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
TicketAddBean
.
RecordsBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
TicketAddBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_order
,
item
.
getOrderId
());
helper
.
setText
(
R
.
id
.
tv_order
,
item
.
getOrderId
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getProductSpec
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getProductSpec
());
helper
.
setText
(
R
.
id
.
tv_unit
,
item
.
getProductUnit
());
helper
.
setText
(
R
.
id
.
tv_unit
,
item
.
getProductUnit
());
helper
.
setText
(
R
.
id
.
tv_apply_num
,
item
.
getProductCount
()
+
""
);
helper
.
setText
(
R
.
id
.
tv_apply_num
,
item
.
getProductCount
()
+
""
);
helper
.
setText
(
R
.
id
.
tv_price
,
item
.
getCarPrice
());
helper
.
setText
(
R
.
id
.
tv_price
,
item
.
getCarPrice
());
helper
.
setText
(
R
.
id
.
tv_num
,
item
.
getCarNum
()+
""
);
helper
.
setText
(
R
.
id
.
tv_num
,
item
.
getCarNum
()
+
""
);
if
(
type
==
1
)
{
helper
.
setVisible
(
R
.
id
.
iv_cart
,
false
);
}
}
}
}
}
app/src/main/res/layout/activity_bat_sale_client.xml
浏览文件 @
2fde70bc
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_client"
android:id=
"@+id/rv_client"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_cont
ent"
android:layout_height=
"
match_par
ent"
android:layout_marginTop=
"4mm"
>
android:layout_marginTop=
"4mm"
>
</androidx.recyclerview.widget.RecyclerView>
</androidx.recyclerview.widget.RecyclerView>
...
...
app/src/main/res/layout/activity_open_ticket_add.xml
浏览文件 @
2fde70bc
...
@@ -13,19 +13,19 @@
...
@@ -13,19 +13,19 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"48mm"
android:layout_height=
"48mm"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:background=
"#5C768A"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/white"
android:text=
"下一步,选择产品来源"
android:text=
"下一步,选择产品来源"
android:
background=
"#5C768A"
/>
android:
textColor=
"@color/white"
/>
<LinearLayout
<LinearLayout
android:layout_above=
"@id/tv_next"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/tv_next"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_order"
android:id=
"@+id/rl_order"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -52,23 +52,25 @@
...
@@ -52,23 +52,25 @@
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:layout_marginLeft=
"10mm"
android:text=
"选择订单类别"
android:text=
"选择订单类别"
android:textSize=
"1
6
sp"
/>
android:textSize=
"1
5
sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
>
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
<TextView
android:id=
"@+id/tv_order"
android:id=
"@+id/tv_order"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:layout_marginRight=
"10mm"
android:maxLines=
"1"
android:text=
"请选择订单类别"
android:text=
"请选择订单类别"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<ImageView
<ImageView
...
@@ -77,9 +79,9 @@
...
@@ -77,9 +79,9 @@
android:background=
"@mipmap/arrow_right_blue"
/>
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_dep"
android:id=
"@+id/rl_dep"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -106,34 +108,38 @@
...
@@ -106,34 +108,38 @@
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:layout_marginLeft=
"10mm"
android:text=
"选择所属部门"
android:text=
"选择所属部门"
android:textSize=
"1
6
sp"
/>
android:textSize=
"1
5
sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"3mm"
android:gravity=
"center_vertical"
>
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
<TextView
android:id=
"@+id/tv_dep"
android:id=
"@+id/tv_dep"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"请选择所属部门"
android:text=
"请选择所属部门"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<ImageView
<ImageView
android:layout_width=
"6mm"
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_client"
android:id=
"@+id/rl_client"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -161,31 +167,35 @@
...
@@ -161,31 +167,35 @@
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:layout_marginLeft=
"10mm"
android:text=
"选择客户"
android:text=
"选择客户"
android:textSize=
"1
6
sp"
/>
android:textSize=
"1
5
sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"3mm"
android:gravity=
"center_vertical"
>
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
<TextView
android:id=
"@+id/tv_client"
android:id=
"@+id/tv_client"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"选择客户"
android:text=
"选择客户"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<ImageView
<ImageView
android:layout_width=
"6mm"
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_open_ticket_submit.xml
0 → 100644
浏览文件 @
2fde70bc
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<TextView
android:id=
"@+id/tv_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"48mm"
android:layout_alignParentBottom=
"true"
android:background=
"#5C768A"
android:gravity=
"center"
android:orientation=
"horizontal"
android:text=
"提交申请"
android:textColor=
"@color/white"
android:textSize=
"16sp"
></TextView>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/tv_bottom"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingBottom=
"20mm"
>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
>
<View
android:layout_width=
"8mm"
android:layout_height=
"18mm"
android:background=
"@color/red_btn_bg"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"基本信息"
android:textSize=
"15sp"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"15mm"
>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"所属客户"
android:textSize=
"15sp"
/>
<TextView
android:id=
"@+id/tv_client"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"销售二公司"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"15sp"
/>
</RelativeLayout>
<View
style=
"@style/dividerX"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"15mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"开票总价"
android:textSize=
"15sp"
/>
<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=
"15sp"
/>
</RelativeLayout>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
>
<View
android:layout_width=
"8mm"
android:layout_height=
"18mm"
android:background=
"@color/red_btn_bg"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"开票来源"
android:textSize=
"15sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_data"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"15mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"税费"
android:textSize=
"15sp"
/>
<EditText
android:id=
"@+id/et_tax"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"right"
android:hint=
"输入税率"
android:inputType=
"numberDecimal"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"15sp"
/>
</LinearLayout>
<View
style=
"@style/dividerX"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"备注"
android:textSize=
"15sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_remark"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_remark_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
app/src/main/res/layout/activity_receive_ticket_add.xml
浏览文件 @
2fde70bc
...
@@ -13,19 +13,19 @@
...
@@ -13,19 +13,19 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"48mm"
android:layout_height=
"48mm"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:background=
"#5C768A"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/white"
android:text=
"下一步,选择产品来源"
android:text=
"下一步,选择产品来源"
android:
background=
"#5C768A"
/>
android:
textColor=
"@color/white"
/>
<LinearLayout
<LinearLayout
android:layout_above=
"@id/tv_next"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/tv_next"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_order"
android:id=
"@+id/rl_order"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -57,18 +57,19 @@
...
@@ -57,18 +57,19 @@
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_
alignParentRight=
"true
"
android:layout_
weight=
"1
"
android:gravity=
"center_vertical"
>
android:gravity=
"center_vertical
|right
"
>
<TextView
<TextView
android:id=
"@+id/tv_order"
android:id=
"@+id/tv_order"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:layout_marginRight=
"10mm"
android:maxLines=
"1"
android:text=
"请选择订单类别"
android:text=
"请选择订单类别"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<ImageView
<ImageView
...
@@ -77,9 +78,9 @@
...
@@ -77,9 +78,9 @@
android:background=
"@mipmap/arrow_right_blue"
/>
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_dep"
android:id=
"@+id/rl_dep"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -92,7 +93,6 @@
...
@@ -92,7 +93,6 @@
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
android:gravity=
"center_vertical"
>
<View
<View
...
@@ -111,29 +111,34 @@
...
@@ -111,29 +111,34 @@
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_
alignParentRight=
"true
"
android:layout_
marginLeft=
"3mm
"
android:gravity=
"center_vertical"
>
>
<TextView
<TextView
android:id=
"@+id/tv_dep"
android:id=
"@+id/tv_dep"
android:layout_width=
"wrap_content"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:gravity=
"end"
android:ellipsize=
"end"
android:singleLine=
"true"
android:text=
"请选择所属部门"
android:text=
"请选择所属部门"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<ImageView
<ImageView
android:layout_width=
"6mm"
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_client"
android:id=
"@+id/rl_client"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -146,7 +151,6 @@
...
@@ -146,7 +151,6 @@
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
android:gravity=
"center_vertical"
>
<View
<View
...
@@ -166,26 +170,29 @@
...
@@ -166,26 +170,29 @@
<LinearLayout
<LinearLayout
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"3mm"
>
android:gravity=
"center_vertical"
>
<TextView
<TextView
android:id=
"@+id/tv_client"
android:id=
"@+id/tv_client"
android:layout_width=
"wrap_content"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:gravity=
"right"
android:singleLine=
"true"
android:text=
"选择供应商"
android:text=
"选择供应商"
android:textSize=
"1
6
sp"
android:textSize=
"1
5
sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<ImageView
<ImageView
android:layout_width=
"6mm"
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</
Relative
Layout>
</
Linear
Layout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_receive_ticket_submit.xml
0 → 100644
浏览文件 @
2fde70bc
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<TextView
android:id=
"@+id/tv_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"48mm"
android:layout_alignParentBottom=
"true"
android:background=
"#5C768A"
android:gravity=
"center"
android:orientation=
"horizontal"
android:text=
"提交申请"
android:textColor=
"@color/white"
android:textSize=
"16sp"
></TextView>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/tv_bottom"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingBottom=
"20mm"
>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
>
<View
android:layout_width=
"8mm"
android:layout_height=
"18mm"
android:background=
"@color/red_btn_bg"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"基本信息"
android:textSize=
"15sp"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"15mm"
>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"所属供应商"
android:textSize=
"15sp"
/>
<TextView
android:id=
"@+id/tv_client"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"销售二公司"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"15sp"
/>
</RelativeLayout>
<View
style=
"@style/dividerX"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"15mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"开票总价"
android:textSize=
"15sp"
/>
<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=
"15sp"
/>
</RelativeLayout>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
>
<View
android:layout_width=
"8mm"
android:layout_height=
"18mm"
android:background=
"@color/red_btn_bg"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:text=
"开票来源"
android:textSize=
"15sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_data"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<View
style=
"@style/ViewX"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"15mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"税费"
android:textSize=
"15sp"
/>
<EditText
android:id=
"@+id/et_tax"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"right"
android:hint=
"输入税率"
android:inputType=
"numberDecimal"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"15sp"
/>
</LinearLayout>
<View
style=
"@style/dividerX"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"备注"
android:textSize=
"15sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/et_remark"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3mm"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请输入"
android:minLines=
"4"
android:padding=
"5mm"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_remark_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_margin=
"4mm"
android:text=
"0/140"
android:textColor=
"@color/flexible_text_gray"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
app/src/main/res/layout/item_ticket_add_detail.xml
浏览文件 @
2fde70bc
...
@@ -172,6 +172,7 @@
...
@@ -172,6 +172,7 @@
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
<ImageView
<ImageView
android:id=
"@+id/iv_cart"
android:layout_width=
"25mm"
android:layout_width=
"25mm"
android:layout_height=
"25mm"
android:layout_height=
"25mm"
android:layout_gravity=
"right"
android:layout_gravity=
"right"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论