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
75dfafec
提交
75dfafec
authored
4月 06, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.开票第二步骤
2.//TODO erp用户激活测试,忘记/重置密码测试,开票第一步参数修改,开票收票新增,开票收票操作,产品下单还差附件,bat,mes,消息,刷新token
上级
8449305d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
830 行增加
和
205 行删除
+830
-205
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-1
TicketAddBean.java
app/src/main/java/com/wd/workoffice/bean/TicketAddBean.java
+0
-0
TicketDetailBean.java
...rc/main/java/com/wd/workoffice/bean/TicketDetailBean.java
+179
-179
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+59
-10
WorkChooseProductActivity.java
...ffice/ui/activity/bat/work/WorkChooseProductActivity.java
+244
-0
WorkFinancialReceiveTicketActivity.java
...activity/bat/work/WorkFinancialReceiveTicketActivity.java
+1
-1
WorkFinancialReceiveTicketAddActivity.java
...ivity/bat/work/WorkFinancialReceiveTicketAddActivity.java
+3
-3
WorkFinancialReceiveTicketDetailActivity.java
...ty/bat/work/WorkFinancialReceiveTicketDetailActivity.java
+0
-1
WorkFinancialTicketAddActivity.java
.../ui/activity/bat/work/WorkFinancialTicketAddActivity.java
+3
-10
WorkAddTicketOrderAdapter.java
...m/wd/workoffice/ui/adapter/WorkAddTicketOrderAdapter.java
+34
-0
AddAndReduceView.java
.../main/java/com/wd/workoffice/widget/AddAndReduceView.java
+16
-0
activity_open_ticket_add.xml
app/src/main/res/layout/activity_open_ticket_add.xml
+0
-0
activity_work_choose_pro.xml
app/src/main/res/layout/activity_work_choose_pro.xml
+101
-0
item_ticket_add_detail.xml
app/src/main/res/layout/item_ticket_add_detail.xml
+181
-0
view_add_cart.xml
app/src/main/res/layout/view_add_cart.xml
+1
-0
ticket_add_cart.png
app/src/main/res/mipmap-xhdpi/ticket_add_cart.png
+0
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
75dfafec
...
...
@@ -712,7 +712,14 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.work.WorkChooseProductActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"选择开票来源"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/bean/TicketAddBean.java
0 → 100644
浏览文件 @
75dfafec
差异被折叠。
点击展开。
app/src/main/java/com/wd/workoffice/bean/TicketDetailBean.java
浏览文件 @
75dfafec
...
...
@@ -8,197 +8,197 @@ import java.util.List;
* github: https://github.com/FlexibleXd
**/
public
class
TicketDetailBean
{
/**
* createdBy : 705
* createdByName : null
* createdTime : 2020-03-28 16:00:55
* updatedBy : null
* updatedByName : null
* updatedTime : null
* id : 59
* applyId : 66
* orderId : AO100012
* productId : 32
* quantity : 1.0
* outProductName : 浸入式水口(方坯)
* invoiceUnitPrice : 850.0
* productName : 浸入式水口(方坯)
* productSoleCode : 70LTJ568-1001
* productSimpleCode : J568-1
* productSpec : 90
* productUnit : 支
* productWeight : 0.0
*/
private
int
createdBy
;
private
Object
createdByName
;
private
String
createdTime
;
private
Object
updatedBy
;
private
Object
updatedByName
;
private
Object
updatedTime
;
private
int
id
;
private
int
applyId
;
private
String
orderId
;
private
int
productId
;
private
double
quantity
;
private
String
outProductName
;
private
double
invoiceUnitPrice
;
private
String
productName
;
private
String
productSoleCode
;
private
String
productSimpleCode
;
private
String
productSpec
;
private
String
productUnit
;
private
double
productWeight
;
public
int
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
int
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Object
getCreatedByName
()
{
return
createdByName
;
}
public
void
setCreatedByName
(
Object
createdByName
)
{
this
.
createdByName
=
createdByName
;
}
public
String
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Object
getUpdatedBy
()
{
return
updatedBy
;
}
public
void
setUpdatedBy
(
Object
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
public
Object
getUpdatedByName
()
{
return
updatedByName
;
}
public
void
setUpdatedByName
(
Object
updatedByName
)
{
this
.
updatedByName
=
updatedByName
;
}
public
Object
getUpdatedTime
()
{
return
updatedTime
;
}
public
void
setUpdatedTime
(
Object
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getApplyId
()
{
return
applyId
;
}
public
void
setApplyId
(
int
applyId
)
{
this
.
applyId
=
applyId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
int
getProductId
()
{
return
productId
;
}
public
void
setProductId
(
int
productId
)
{
this
.
productId
=
productId
;
}
public
double
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
double
quantity
)
{
this
.
quantity
=
quantity
;
}
public
String
getOutProductName
()
{
return
outProductName
;
}
public
void
setOutProductName
(
String
outProductName
)
{
this
.
outProductName
=
outProductName
;
}
/**
* createdBy : 705
* createdByName : null
* createdTime : 2020-03-28 16:00:55
* updatedBy : null
* updatedByName : null
* updatedTime : null
* id : 59
* applyId : 66
* orderId : AO100012
* productId : 32
* quantity : 1.0
* outProductName : 浸入式水口(方坯)
* invoiceUnitPrice : 850.0
* productName : 浸入式水口(方坯)
* productSoleCode : 70LTJ568-1001
* productSimpleCode : J568-1
* productSpec : 90
* productUnit : 支
* productWeight : 0.0
*/
private
int
createdBy
;
private
Object
createdByName
;
private
String
createdTime
;
private
Object
updatedBy
;
private
Object
updatedByName
;
private
Object
updatedTime
;
private
int
id
;
private
int
applyId
;
private
String
orderId
;
private
int
productId
;
private
double
quantity
;
private
String
outProductName
;
private
double
invoiceUnitPrice
;
private
String
productName
;
private
String
productSoleCode
;
private
String
productSimpleCode
;
private
String
productSpec
;
private
String
productUnit
;
private
double
productWeight
;
public
int
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
int
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Object
getCreatedByName
()
{
return
createdByName
;
}
public
void
setCreatedByName
(
Object
createdByName
)
{
this
.
createdByName
=
createdByName
;
}
public
String
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Object
getUpdatedBy
()
{
return
updatedBy
;
}
public
void
setUpdatedBy
(
Object
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
public
Object
getUpdatedByName
()
{
return
updatedByName
;
}
public
void
setUpdatedByName
(
Object
updatedByName
)
{
this
.
updatedByName
=
updatedByName
;
}
public
Object
getUpdatedTime
()
{
return
updatedTime
;
}
public
void
setUpdatedTime
(
Object
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getApplyId
()
{
return
applyId
;
}
public
void
setApplyId
(
int
applyId
)
{
this
.
applyId
=
applyId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
int
getProductId
()
{
return
productId
;
}
public
void
setProductId
(
int
productId
)
{
this
.
productId
=
productId
;
}
public
double
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
double
quantity
)
{
this
.
quantity
=
quantity
;
}
public
String
getOutProductName
()
{
return
outProductName
;
}
public
double
getInvoiceUnitPrice
(
)
{
return
invoiceUnitPric
e
;
}
public
void
setOutProductName
(
String
outProductName
)
{
this
.
outProductName
=
outProductNam
e
;
}
public
void
setInvoiceUnitPrice
(
double
invoiceUnitPrice
)
{
this
.
invoiceUnitPrice
=
invoiceUnitPrice
;
}
public
double
getInvoiceUnitPrice
(
)
{
return
invoiceUnitPrice
;
}
public
String
getProductName
(
)
{
return
productNam
e
;
}
public
void
setInvoiceUnitPrice
(
double
invoiceUnitPrice
)
{
this
.
invoiceUnitPrice
=
invoiceUnitPric
e
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
String
getProductName
(
)
{
return
productName
;
}
public
String
getProductSoleCode
(
)
{
return
productSoleCod
e
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productNam
e
;
}
public
void
setProductSoleCode
(
String
productSoleCode
)
{
this
.
productSoleCode
=
productSoleCode
;
}
public
String
getProductSoleCode
(
)
{
return
productSoleCode
;
}
public
String
getProductSimpleCode
(
)
{
return
productSimp
leCode
;
}
public
void
setProductSoleCode
(
String
productSoleCode
)
{
this
.
productSoleCode
=
productSo
leCode
;
}
public
void
setProductSimpleCode
(
String
productSimpleCode
)
{
this
.
productSimpleCode
=
productSimpleCode
;
}
public
String
getProductSimpleCode
(
)
{
return
productSimpleCode
;
}
public
String
getProductSpec
(
)
{
return
productSpec
;
}
public
void
setProductSimpleCode
(
String
productSimpleCode
)
{
this
.
productSimpleCode
=
productSimpleCode
;
}
public
void
setProductSpec
(
String
productSpec
)
{
this
.
productSpec
=
productSpec
;
}
public
String
getProductSpec
(
)
{
return
productSpec
;
}
public
String
getProductUnit
(
)
{
return
productUnit
;
}
public
void
setProductSpec
(
String
productSpec
)
{
this
.
productSpec
=
productSpec
;
}
public
void
setProductUnit
(
String
productUnit
)
{
this
.
productUnit
=
productUnit
;
}
public
String
getProductUnit
(
)
{
return
productUnit
;
}
public
double
getProductWeight
()
{
return
productWeight
;
}
public
void
setProductUnit
(
String
productUnit
)
{
this
.
productUnit
=
productUnit
;
}
public
double
getProductWeight
()
{
return
productWeight
;
}
public
void
setProductWeight
(
double
productWeight
)
{
this
.
productWeight
=
productWeight
;
}
public
void
setProductWeight
(
double
productWeight
)
{
this
.
productWeight
=
productWeight
;
}
}
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
75dfafec
...
...
@@ -539,7 +539,7 @@ public interface ApiService {
* @return
*/
@GET
(
"/invoiceApply/po/exam"
)
Observable
<
BaseBean
>
poExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
poExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* co开票审核
...
...
@@ -547,14 +547,15 @@ public interface ApiService {
* @return
*/
@GET
(
"/invoiceApply/co/exam"
)
Observable
<
BaseBean
>
coExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
coExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* Fo收票审核
*
* @return
*/
@GET
(
"/receiptInvoiceApply/fo/exam"
)
Observable
<
BaseBean
>
receiveFoExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
receiveFoExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* po收票审核
...
...
@@ -562,7 +563,7 @@ public interface ApiService {
* @return
*/
@GET
(
"/receiptInvoiceApply/po/exam"
)
Observable
<
BaseBean
>
receivePoExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
Observable
<
BaseBean
>
receivePoExam
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 外采购收票分页列表
...
...
@@ -580,6 +581,7 @@ public interface ApiService {
*/
@GET
(
"/receiptInvoiceApply/fo/page/list"
)
Observable
<
BaseBean
>
receiveFoTicket
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 库存数量:一个仓库里的产品列表
*
...
...
@@ -678,7 +680,7 @@ public interface ApiService {
* @return
*/
@GET
(
"/invoice-apply/item/list"
)
Observable
<
BaseBean
>
ticketDetail
(
@Query
(
"applyId"
)
String
applyId
);
Observable
<
BaseBean
>
ticketDetail
(
@Query
(
"applyId"
)
String
applyId
);
/**
* 发票明细列表
...
...
@@ -686,7 +688,7 @@ public interface ApiService {
* @return
*/
@GET
(
"/receiptInvoiceApplyItem/list"
)
Observable
<
BaseBean
>
ticketReceiveDetail
(
@Query
(
"applyId"
)
String
applyId
);
Observable
<
BaseBean
>
ticketReceiveDetail
(
@Query
(
"applyId"
)
String
applyId
);
/**
* 获取运费开票详情(开票的运费记录)
...
...
@@ -694,14 +696,15 @@ public interface ApiService {
* @return
*/
@GET
(
"/finance-logistics-apply/detail/page/list"
)
Observable
<
BaseBean
>
logisticsDetail
(
@Query
(
"applyId"
)
String
applyId
);
Observable
<
BaseBean
>
logisticsDetail
(
@Query
(
"applyId"
)
String
applyId
);
/**
* 审批开票申请
*id
*
id
* status 未处理:0 通过:1 驳回:2
* remark
* invoiceNumber
*
* @return
*/
@PUT
(
"/finance-logistics-apply"
)
...
...
@@ -710,29 +713,75 @@ public interface ApiService {
/**
* 审批开票申请
*orderType
*
orderType
* applyAmount
* applyDept
* customerId
* process
* applyRemark
*
* @return
*/
@POST
(
"/moneyBackApply/apply"
)
Observable
<
BaseBean
>
moneyBackApply
(
@Body
RequestBody
requestBody
);
/**
* 审批开票申请
*orderType
*
orderType
* applyAmount
* applyDept
* customerId
* process
* applyRemark
*
* @return
*/
@POST
(
"/moneyPayApply/apply"
)
Observable
<
BaseBean
>
moneyPayApply
(
@Body
RequestBody
requestBody
);
/**
* 为开票查询的订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET
(
"/saleOrder/forInvoice"
)
Observable
<
BaseBean
>
saleTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 为组装查询的订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET
(
"/package-order/item/page/list"
)
Observable
<
BaseBean
>
packageTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 为外采购查询的订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET
(
"/purchaseOrder/forInvoice"
)
Observable
<
BaseBean
>
purchaseTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* /**
* 坩埚订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET
(
"/crucibleSaleOrder/forInvoice"
)
Observable
<
BaseBean
>
crucibleTicketOrder
(
@QueryMap
Map
<
String
,
Object
>
param
);
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkChooseProductActivity.java
0 → 100644
浏览文件 @
75dfafec
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
work
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProPriceBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.TicketDetailBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity
;
import
com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
java.util.ArrayList
;
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
WorkChooseProductActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_ok
)
TextView
tvOk
;
@BindView
(
R
.
id
.
ll_bottom
)
RelativeLayout
llBottom
;
@BindView
(
R
.
id
.
et_key
)
EditText
etKey
;
@BindView
(
R
.
id
.
btn_search
)
Button
btnSearch
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
private
Map
<
String
,
Object
>
param
;
private
List
<
TicketAddBean
.
RecordsBean
>
clientList
;
private
WorkAddTicketOrderAdapter
clientAdapter
;
private
int
page
=
1
;
private
List
<
TicketAddBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
private
void
openDialog
(
TicketAddBean
.
RecordsBean
data
,
int
position
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_add_cart
,
null
);
TextView
tvOk
=
view
.
findViewById
(
R
.
id
.
tv_ok
);
TextView
tvCancel
=
view
.
findViewById
(
R
.
id
.
tv_cancel
);
TextView
tvDesc
=
view
.
findViewById
(
R
.
id
.
tv_desc
);
tvDesc
.
setText
(
"开票价格"
);
AddAndReduceView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
EditText
etPrice
=
view
.
findViewById
(
R
.
id
.
et_price
);
for
(
TicketAddBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
data
.
getId
()
==
recordsBean
.
getId
())
{
etPrice
.
setText
(
recordsBean
.
getCarPrice
());
num
.
setNumber
(
recordsBean
.
getCarNum
());
}
}
num
.
setMaxNum
(
data
.
getProductCount
());
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
etPrice
.
getText
().
toString
()))
{
toast
(
"请填写开票价格"
);
return
;
}
clientList
.
get
(
position
).
setCarNum
(
num
.
getNumber
());
clientList
.
get
(
position
).
setCarPrice
(
etPrice
.
getText
().
toString
());
clientAdapter
.
notifyItemChanged
(
position
);
addCart
(
data
,
num
.
getNumber
(),
etPrice
.
getText
().
toString
());
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
/**
* 添加购物车
*
* @param chooseProduct 产品
* @param number 数量
* @param price 单价
*/
private
void
addCart
(
TicketAddBean
.
RecordsBean
chooseProduct
,
int
number
,
String
price
)
{
boolean
isHas
=
false
;
for
(
TicketAddBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
chooseProduct
.
getId
()
==
recordsBean
.
getId
())
{
isHas
=
true
;
recordsBean
.
setCarNum
(
number
);
recordsBean
.
setCarPrice
(
price
);
}
}
if
(!
isHas
)
{
chooseProduct
.
setCarNum
(
number
);
chooseProduct
.
setCarPrice
(
price
);
carList
.
add
(
chooseProduct
);
}
toast
(
"加入购物车成功"
);
}
@Override
protected
void
initData
()
{
clientList
=
new
ArrayList
<>();
clientAdapter
=
new
WorkAddTicketOrderAdapter
(
R
.
layout
.
item_ticket_add_detail
,
clientList
);
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"current"
,
1
);
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"launchDeptId"
,
getIntent
().
getStringExtra
(
"depId"
));
getData
();
}
private
void
getData
()
{
Observable
<
BaseBean
>
observable
;
if
(
TextUtils
.
equals
(
"销售订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
observable
=
RtfUtils
.
getRtf
().
saleTicketOrder
(
param
);
}
else
if
(
TextUtils
.
equals
(
"组装订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
observable
=
RtfUtils
.
getRtf
().
packageTicketOrder
(
param
);
}
else
if
(
TextUtils
.
equals
(
"外采购订单"
,
getIntent
().
getStringExtra
(
"orderType"
)))
{
observable
=
RtfUtils
.
getRtf
().
purchaseTicketOrder
(
param
);
}
else
{
observable
=
RtfUtils
.
getRtf
().
crucibleTicketOrder
(
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
<
TicketAddBean
.
RecordsBean
>
dataList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
TicketAddBean
.
class
).
getRecords
();
if
(
page
==
1
)
{
clientList
.
clear
();
clientList
.
addAll
(
dataList
);
clientAdapter
.
notifyDataSetChanged
();
clientAdapter
.
loadMoreComplete
();
}
else
{
clientAdapter
.
loadMoreComplete
();
clientList
.
addAll
(
dataList
);
clientAdapter
.
notifyDataSetChanged
();
}
if
(
dataList
.
size
()
==
0
)
{
clientAdapter
.
loadMoreEnd
();
}
else
{
page
++;
}
}
});
}
@Override
protected
void
initEvent
()
{
clientAdapter
.
setOnLoadMoreListener
(
new
BaseQuickAdapter
.
RequestLoadMoreListener
()
{
@Override
public
void
onLoadMoreRequested
()
{
param
.
put
(
"current"
,
page
);
getData
();
}
},
rvProduct
);
clientAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
openDialog
(
clientList
.
get
(
position
),
position
);
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_work_choose_pro
;
}
@OnClick
({
R
.
id
.
tv_ok
,
R
.
id
.
btn_search
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_ok
:
if
(
carList
.
size
()
==
0
)
{
toast
(
"购物车没有产品"
);
return
;
}
startActivity
(
StoreSaleCarActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
carList
),
"subProcess"
,
getIntent
().
getStringExtra
(
"subProcess"
),
"customerId"
,
getIntent
().
getStringExtra
(
"transitPartId"
),
"receiveDeptId"
,
getIntent
().
getStringExtra
(
"depId"
),
"code"
,
getIntent
().
getStringExtra
(
"code"
));
break
;
case
R
.
id
.
btn_search
:
param
.
put
(
"name"
,
etKey
.
getText
().
toString
());
param
.
put
(
"current"
,
1
);
page
=
1
;
getData
();
break
;
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialReceiveTicketActivity.java
浏览文件 @
75dfafec
...
...
@@ -189,7 +189,7 @@ public class WorkFinancialReceiveTicketActivity extends WorkToolBarActivity {
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
add
:
// startActivity(WorkInStockSearch
Activity.class);
startActivity
(
WorkFinancialReceiveTicketAdd
Activity
.
class
);
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialReceiveTicketAddActivity.java
浏览文件 @
75dfafec
...
...
@@ -45,7 +45,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
private
Map
<
String
,
Object
>
param
;
private
Integer
clientId
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
String
[]
typeList
=
new
String
[]{
"外采购订单"
,
"供应"
};
String
[]
typeList
=
new
String
[]{
"外采购订单"
,
"供应
订单
"
};
private
String
chooseType
;
private
Integer
depId
;
...
...
@@ -75,7 +75,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_
open_ticke_addt
;
return
R
.
layout
.
activity_
receive_ticket_add
;
}
...
...
@@ -127,7 +127,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
break
;
case
R
.
id
.
rl_client
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"code"
,
"SUPPLIER"
);
"code"
,
"SUPPLIER"
,
"supplier"
,
"选择供应商"
);
break
;
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialReceiveTicketDetailActivity.java
浏览文件 @
75dfafec
...
...
@@ -93,7 +93,6 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
param
=
new
HashMap
<>();
param
.
put
(
"id"
,
getIntent
().
getStringExtra
(
"id"
));
orderType
=
getIntent
().
getStringExtra
(
"type"
);
}
private
void
getData
(
String
id
)
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkFinancialTicketAddActivity.java
浏览文件 @
75dfafec
...
...
@@ -10,6 +10,7 @@ import android.widget.TextView;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.WorkUtils
;
...
...
@@ -75,11 +76,10 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_open_ticke
_addt
;
return
R
.
layout
.
activity_open_ticke
t_add
;
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
...
...
@@ -95,7 +95,6 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
}
@OnClick
({
R
.
id
.
tv_next
,
R
.
id
.
rl_order
,
R
.
id
.
rl_dep
,
R
.
id
.
rl_client
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
...
...
@@ -113,13 +112,7 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
toast
(
"请先选择客户"
);
return
;
}
// param.put("process", PermissionType.);
// param.put("applyRemark", etRemark.getText().toString());
// param.put("applyDept", UserKeeper.getInstance().getUserDepId());
// param.put("orderType", chooseType);
// param.put("applyAmount", etPrice.getText().toString());
startActivity
(
StoreSaleClientActivity
.
class
);
startActivity
(
WorkChooseProductActivity
.
class
,
"orderType"
,
tvOrder
.
getText
().
toString
(),
"depId"
,
""
+
""
,
"customerId"
,
clientId
+
""
);
break
;
case
R
.
id
.
rl_order
:
typeDialog
.
show
();
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/WorkAddTicketOrderAdapter.java
0 → 100644
浏览文件 @
75dfafec
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.TicketDetailBean
;
import
com.wd.workoffice.util.MathUtils
;
import
java.util.List
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
WorkAddTicketOrderAdapter
extends
BaseQuickAdapter
<
TicketAddBean
.
RecordsBean
,
BaseViewHolder
>
{
public
WorkAddTicketOrderAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
TicketAddBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_order
,
item
.
getOrderId
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getProductSpec
());
helper
.
setText
(
R
.
id
.
tv_unit
,
item
.
getProductUnit
());
helper
.
setText
(
R
.
id
.
tv_apply_num
,
item
.
getProductCount
()+
""
);
helper
.
setText
(
R
.
id
.
tv_price
,
item
.
getCarPrice
());
helper
.
setText
(
R
.
id
.
tv_num
,
item
.
getCarNum
()+
""
);
}
}
app/src/main/java/com/wd/workoffice/widget/AddAndReduceView.java
浏览文件 @
75dfafec
...
...
@@ -11,12 +11,16 @@ import android.widget.Toast;
import
com.wd.workoffice.R
;
import
flexible.xd.android_base.utils.ToastUtil
;
public
class
AddAndReduceView
extends
LinearLayout
implements
View
.
OnClickListener
{
private
final
Button
add
;
private
final
Button
remove
;
private
final
TextView
tvNum
;
private
int
num
=
1
;
private
int
maxNum
=
10000
;
public
AddAndReduceView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
...
...
@@ -44,6 +48,10 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen
num
=
Integer
.
parseInt
(
s
);
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_add
:
if
(
num
==
maxNum
)
{
ToastUtil
.
showShort
(
"目前已选择最大数量"
);
return
;
}
num
++;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
...
...
@@ -65,6 +73,14 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen
}
}
public
int
getMaxNum
()
{
return
maxNum
;
}
public
void
setMaxNum
(
int
maxNum
)
{
this
.
maxNum
=
maxNum
;
}
public
interface
OnNumberChangedListener
{
void
OnNumberChanged
(
int
vs
);
}
...
...
app/src/main/res/layout/activity_open_ticke
_addt
.xml
→
app/src/main/res/layout/activity_open_ticke
t_add
.xml
浏览文件 @
75dfafec
File moved
app/src/main/res/layout/activity_work_choose_pro.xml
0 → 100644
浏览文件 @
75dfafec
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"15mm"
android:text=
"共选中 0 件"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"80mm"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:background=
"@color/red_btn_bg"
android:gravity=
"center"
android:text=
"申请下单"
android:textColor=
"@color/white"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/shape_client_search"
android:gravity=
"center_vertical"
android:paddingHorizontal=
"10mm"
>
<ImageView
android:layout_width=
"15mm"
android:layout_height=
"15mm"
android:src=
"@mipmap/client_search"
/>
<EditText
android:id=
"@+id/et_key"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"2mm"
android:background=
"@null"
android:hint=
"搜索图号/品名/规则/品号"
android:maxLines=
"1"
android:textColor=
"#91ABBA"
android:textColorHint=
"#91ABBA"
android:textSize=
"14sp"
/>
</LinearLayout>
<Button
android:id=
"@+id/btn_search"
android:layout_width=
"60mm"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:background=
"@color/mainTextColor"
android:text=
"搜索"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_product"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_ticket_add_detail.xml
0 → 100644
浏览文件 @
75dfafec
<?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"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5mm"
android:text=
"邢台德龙钢铁客户"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:paddingVertical=
"10mm"
>
<RelativeLayout
android:id=
"@+id/rl_dep"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"订单编号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_order"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"规格"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_spec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"单位"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_unit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"可申请数量"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_apply_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:gravity=
"center_vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"开单单价:"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"13sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15mm"
android:text=
"申请数量:"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"12sp"
/>
<ImageView
android:layout_width=
"25mm"
android:layout_height=
"25mm"
android:layout_gravity=
"right"
android:src=
"@mipmap/ticket_add_cart"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/view_add_cart.xml
浏览文件 @
75dfafec
...
...
@@ -24,6 +24,7 @@
android:paddingHorizontal=
"20mm"
>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
...
...
app/src/main/res/mipmap-xhdpi/ticket_add_cart.png
0 → 100644
浏览文件 @
75dfafec
1.9 KB
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论