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
4b8bfe29
提交
4b8bfe29
authored
4月 15, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.组装订单申请
2.//TODO erp用户激活测试,忘记/重置密码测试,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,组装下单,产品下单还差附件测试,mes,刷新token
上级
be28b80d
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
2776 行增加
和
2 行删除
+2776
-2
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+32
-0
ProAddBean.java
app/src/main/java/com/wd/workoffice/bean/ProAddBean.java
+536
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+19
-0
ProductConfirmActivity.java
...koffice/ui/activity/bat/order/ProductConfirmActivity.java
+237
-0
ProductOrderAddActivity.java
...office/ui/activity/bat/order/ProductOrderAddActivity.java
+224
-0
ProductOrderProActivity.java
...office/ui/activity/bat/order/ProductOrderProActivity.java
+262
-0
ProductOrderProTargetActivity.java
.../ui/activity/bat/order/ProductOrderProTargetActivity.java
+258
-0
ReturnApplyActivity.java
...workoffice/ui/activity/bat/order/ReturnApplyActivity.java
+1
-1
SaleProductOrderActivity.java
.../ui/activity/bat/order/sale/SaleProductOrderActivity.java
+2
-1
ProAddAdapter.java
...main/java/com/wd/workoffice/ui/adapter/ProAddAdapter.java
+44
-0
ProTargetAddAdapter.java
...ava/com/wd/workoffice/ui/adapter/ProTargetAddAdapter.java
+42
-0
activity_product_add_pro.xml
app/src/main/res/layout/activity_product_add_pro.xml
+103
-0
activity_product_confirm.xml
app/src/main/res/layout/activity_product_confirm.xml
+318
-0
activity_product_order_add.xml
app/src/main/res/layout/activity_product_order_add.xml
+260
-0
item_product_add_pro.xml
app/src/main/res/layout/item_product_add_pro.xml
+196
-0
item_product_target_pro.xml
app/src/main/res/layout/item_product_target_pro.xml
+131
-0
view_choose_pro_from.xml
app/src/main/res/layout/view_choose_pro_from.xml
+111
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
4b8bfe29
...
...
@@ -1072,6 +1072,38 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.order.ProductOrderAddActivity"
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.order.ProductOrderProActivity"
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.order.ProductOrderProTargetActivity"
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.order.ProductConfirmActivity"
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/ProAddBean.java
0 → 100644
浏览文件 @
4b8bfe29
package
com
.
wd
.
workoffice
.
bean
;
import
java.util.List
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ProAddBean
{
private
List
<
RecordsBean
>
records
;
public
List
<
RecordsBean
>
getRecords
()
{
return
records
;
}
public
void
setRecords
(
List
<
RecordsBean
>
records
)
{
this
.
records
=
records
;
}
public
static
class
RecordsBean
{
/**
* createdBy : null
* createdByName : null
* createdTime : null
* updatedBy : null
* updatedByName : null
* updatedTime : null
* id : 604632d2b19c41e98627fef2a3279ef9
* orderId : SO10741
* productId : 33
* innerPrice : 100.0
* productCount : null
* type : null
* outerPrice : null
* storeSum : null
* shipSum : null
* packageSum : null
* usedSum : null
* invoiceSum : null
* usedReturnSum : null
* oddSum : null
* lotNumber : YWT200324001
* serialNumber : PDS20032408140239
* annex : null
* tranFromStockId : null
* customerBranchFactoryId : null
* version : 0
* productName : 白刚玉
* itemFlows : null
* stockQuantityDetailList : null
* stockQuantityDetailMaps : null
* productSoleCode : 白刚玉
* productSimpleCode : 白刚玉
* productSpec : 80#
* productUnit : 吨
* productWeight : null
* canOutStoreProductSum : null
* canInStoreProductSum : null
* canUseProductSum : null
* canPackageSum : 0.0
* launchDeptName : 销售二公司
* launchDeptId : null
* receiveDeptName : 业务部
* customerId : null
* customerName : 江苏沙钢集团有限公司1
* productOfKind : 外购贴牌
* canInvoiceSum : null
* orderType : SO
* customerBranchFactoryName : null
* orderTypeName : 销售订单
*/
private
Object
createdBy
;
private
Object
createdByName
;
private
Object
createdTime
;
private
Object
updatedBy
;
private
Object
updatedByName
;
private
Object
updatedTime
;
private
String
id
;
private
String
orderId
;
private
int
productId
;
private
double
innerPrice
;
private
Object
productCount
;
private
Object
type
;
private
Object
outerPrice
;
private
Object
storeSum
;
private
Object
shipSum
;
private
Object
packageSum
;
private
Object
usedSum
;
private
Object
invoiceSum
;
private
Object
usedReturnSum
;
private
Object
oddSum
;
private
String
lotNumber
;
private
String
serialNumber
;
private
Object
annex
;
private
Object
tranFromStockId
;
private
Object
customerBranchFactoryId
;
private
int
version
;
private
String
productName
;
private
Object
itemFlows
;
private
Object
stockQuantityDetailList
;
private
Object
stockQuantityDetailMaps
;
private
String
productSoleCode
;
private
String
productSimpleCode
;
private
String
productSpec
;
private
String
productUnit
;
private
Object
productWeight
;
private
Object
canOutStoreProductSum
;
private
Object
canInStoreProductSum
;
private
Object
canUseProductSum
;
private
double
canPackageSum
;
private
String
launchDeptName
;
private
Object
launchDeptId
;
private
String
receiveDeptName
;
private
Object
customerId
;
private
String
customerName
;
private
String
productOfKind
;
private
Object
canInvoiceSum
;
private
String
orderType
;
private
Object
customerBranchFactoryName
;
private
String
orderTypeName
;
private
String
carNum
;
private
String
carPrice
;
public
String
getCarPrice
()
{
return
carPrice
;
}
public
void
setCarPrice
(
String
carPrice
)
{
this
.
carPrice
=
carPrice
;
}
public
String
getCarNum
()
{
return
carNum
;
}
public
void
setCarNum
(
String
carNum
)
{
this
.
carNum
=
carNum
;
}
public
Object
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
Object
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Object
getCreatedByName
()
{
return
createdByName
;
}
public
void
setCreatedByName
(
Object
createdByName
)
{
this
.
createdByName
=
createdByName
;
}
public
Object
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
Object
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
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
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
getInnerPrice
()
{
return
innerPrice
;
}
public
void
setInnerPrice
(
double
innerPrice
)
{
this
.
innerPrice
=
innerPrice
;
}
public
Object
getProductCount
()
{
return
productCount
;
}
public
void
setProductCount
(
Object
productCount
)
{
this
.
productCount
=
productCount
;
}
public
Object
getType
()
{
return
type
;
}
public
void
setType
(
Object
type
)
{
this
.
type
=
type
;
}
public
Object
getOuterPrice
()
{
return
outerPrice
;
}
public
void
setOuterPrice
(
Object
outerPrice
)
{
this
.
outerPrice
=
outerPrice
;
}
public
Object
getStoreSum
()
{
return
storeSum
;
}
public
void
setStoreSum
(
Object
storeSum
)
{
this
.
storeSum
=
storeSum
;
}
public
Object
getShipSum
()
{
return
shipSum
;
}
public
void
setShipSum
(
Object
shipSum
)
{
this
.
shipSum
=
shipSum
;
}
public
Object
getPackageSum
()
{
return
packageSum
;
}
public
void
setPackageSum
(
Object
packageSum
)
{
this
.
packageSum
=
packageSum
;
}
public
Object
getUsedSum
()
{
return
usedSum
;
}
public
void
setUsedSum
(
Object
usedSum
)
{
this
.
usedSum
=
usedSum
;
}
public
Object
getInvoiceSum
()
{
return
invoiceSum
;
}
public
void
setInvoiceSum
(
Object
invoiceSum
)
{
this
.
invoiceSum
=
invoiceSum
;
}
public
Object
getUsedReturnSum
()
{
return
usedReturnSum
;
}
public
void
setUsedReturnSum
(
Object
usedReturnSum
)
{
this
.
usedReturnSum
=
usedReturnSum
;
}
public
Object
getOddSum
()
{
return
oddSum
;
}
public
void
setOddSum
(
Object
oddSum
)
{
this
.
oddSum
=
oddSum
;
}
public
String
getLotNumber
()
{
return
lotNumber
;
}
public
void
setLotNumber
(
String
lotNumber
)
{
this
.
lotNumber
=
lotNumber
;
}
public
String
getSerialNumber
()
{
return
serialNumber
;
}
public
void
setSerialNumber
(
String
serialNumber
)
{
this
.
serialNumber
=
serialNumber
;
}
public
Object
getAnnex
()
{
return
annex
;
}
public
void
setAnnex
(
Object
annex
)
{
this
.
annex
=
annex
;
}
public
Object
getTranFromStockId
()
{
return
tranFromStockId
;
}
public
void
setTranFromStockId
(
Object
tranFromStockId
)
{
this
.
tranFromStockId
=
tranFromStockId
;
}
public
Object
getCustomerBranchFactoryId
()
{
return
customerBranchFactoryId
;
}
public
void
setCustomerBranchFactoryId
(
Object
customerBranchFactoryId
)
{
this
.
customerBranchFactoryId
=
customerBranchFactoryId
;
}
public
int
getVersion
()
{
return
version
;
}
public
void
setVersion
(
int
version
)
{
this
.
version
=
version
;
}
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
Object
getItemFlows
()
{
return
itemFlows
;
}
public
void
setItemFlows
(
Object
itemFlows
)
{
this
.
itemFlows
=
itemFlows
;
}
public
Object
getStockQuantityDetailList
()
{
return
stockQuantityDetailList
;
}
public
void
setStockQuantityDetailList
(
Object
stockQuantityDetailList
)
{
this
.
stockQuantityDetailList
=
stockQuantityDetailList
;
}
public
Object
getStockQuantityDetailMaps
()
{
return
stockQuantityDetailMaps
;
}
public
void
setStockQuantityDetailMaps
(
Object
stockQuantityDetailMaps
)
{
this
.
stockQuantityDetailMaps
=
stockQuantityDetailMaps
;
}
public
String
getProductSoleCode
()
{
return
productSoleCode
;
}
public
void
setProductSoleCode
(
String
productSoleCode
)
{
this
.
productSoleCode
=
productSoleCode
;
}
public
String
getProductSimpleCode
()
{
return
productSimpleCode
;
}
public
void
setProductSimpleCode
(
String
productSimpleCode
)
{
this
.
productSimpleCode
=
productSimpleCode
;
}
public
String
getProductSpec
()
{
return
productSpec
;
}
public
void
setProductSpec
(
String
productSpec
)
{
this
.
productSpec
=
productSpec
;
}
public
String
getProductUnit
()
{
return
productUnit
;
}
public
void
setProductUnit
(
String
productUnit
)
{
this
.
productUnit
=
productUnit
;
}
public
Object
getProductWeight
()
{
return
productWeight
;
}
public
void
setProductWeight
(
Object
productWeight
)
{
this
.
productWeight
=
productWeight
;
}
public
Object
getCanOutStoreProductSum
()
{
return
canOutStoreProductSum
;
}
public
void
setCanOutStoreProductSum
(
Object
canOutStoreProductSum
)
{
this
.
canOutStoreProductSum
=
canOutStoreProductSum
;
}
public
Object
getCanInStoreProductSum
()
{
return
canInStoreProductSum
;
}
public
void
setCanInStoreProductSum
(
Object
canInStoreProductSum
)
{
this
.
canInStoreProductSum
=
canInStoreProductSum
;
}
public
Object
getCanUseProductSum
()
{
return
canUseProductSum
;
}
public
void
setCanUseProductSum
(
Object
canUseProductSum
)
{
this
.
canUseProductSum
=
canUseProductSum
;
}
public
double
getCanPackageSum
()
{
return
canPackageSum
;
}
public
void
setCanPackageSum
(
double
canPackageSum
)
{
this
.
canPackageSum
=
canPackageSum
;
}
public
String
getLaunchDeptName
()
{
return
launchDeptName
;
}
public
void
setLaunchDeptName
(
String
launchDeptName
)
{
this
.
launchDeptName
=
launchDeptName
;
}
public
Object
getLaunchDeptId
()
{
return
launchDeptId
;
}
public
void
setLaunchDeptId
(
Object
launchDeptId
)
{
this
.
launchDeptId
=
launchDeptId
;
}
public
String
getReceiveDeptName
()
{
return
receiveDeptName
;
}
public
void
setReceiveDeptName
(
String
receiveDeptName
)
{
this
.
receiveDeptName
=
receiveDeptName
;
}
public
Object
getCustomerId
()
{
return
customerId
;
}
public
void
setCustomerId
(
Object
customerId
)
{
this
.
customerId
=
customerId
;
}
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getProductOfKind
()
{
return
productOfKind
;
}
public
void
setProductOfKind
(
String
productOfKind
)
{
this
.
productOfKind
=
productOfKind
;
}
public
Object
getCanInvoiceSum
()
{
return
canInvoiceSum
;
}
public
void
setCanInvoiceSum
(
Object
canInvoiceSum
)
{
this
.
canInvoiceSum
=
canInvoiceSum
;
}
public
String
getOrderType
()
{
return
orderType
;
}
public
void
setOrderType
(
String
orderType
)
{
this
.
orderType
=
orderType
;
}
public
Object
getCustomerBranchFactoryName
()
{
return
customerBranchFactoryName
;
}
public
void
setCustomerBranchFactoryName
(
Object
customerBranchFactoryName
)
{
this
.
customerBranchFactoryName
=
customerBranchFactoryName
;
}
public
String
getOrderTypeName
()
{
return
orderTypeName
;
}
public
void
setOrderTypeName
(
String
orderTypeName
)
{
this
.
orderTypeName
=
orderTypeName
;
}
}
}
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
4b8bfe29
...
...
@@ -490,6 +490,9 @@ public interface ApiService {
@POST
(
"/purchaseOrder/start"
)
Observable
<
BaseBean
>
submitPurchaseOrder
(
@Body
RequestBody
requestBody
);
@POST
(
"/procedureStart/ao/applyPackage"
)
Observable
<
BaseBean
>
submitProcedureOrder
(
@Body
RequestBody
requestBody
);
/**
* 获取客户分厂
*
...
...
@@ -1521,5 +1524,21 @@ public interface ApiService {
*/
@PUT
(
"/purchaseOrder/enter-stock-type"
)
Observable
<
BaseBean
>
purchaseOrderStockType
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 2组装来源列表
*
* @return
*/
@GET
(
"/saleOrder/item/page/list"
)
Observable
<
BaseBean
>
saleOrderPro
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 3获取当前客户可组装成品(分页)
*
* @return
*/
@GET
(
"/product/can-package/page/list"
)
Observable
<
BaseBean
>
saleOrderTargetPro
(
@QueryMap
Map
<
String
,
Object
>
param
);
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductConfirmActivity.java
0 → 100644
浏览文件 @
4b8bfe29
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProAddBean
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreOrderSuccessActivity
;
import
com.wd.workoffice.ui.adapter.ProAddAdapter
;
import
com.wd.workoffice.ui.adapter.ProTargetAddAdapter
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.WorkUtils
;
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.disposables.Disposable
;
/**
* 组装
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ProductConfirmActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R
.
id
.
tv_ok
)
TextView
tvOk
;
@BindView
(
R
.
id
.
ll_bottom
)
RelativeLayout
llBottom
;
@BindView
(
R
.
id
.
tv_base1
)
TextView
tvBase1
;
@BindView
(
R
.
id
.
tv_base2
)
TextView
tvBase2
;
@BindView
(
R
.
id
.
tv_base3
)
TextView
tvBase3
;
@BindView
(
R
.
id
.
tv_base4
)
TextView
tvBase4
;
@BindView
(
R
.
id
.
tv_base5
)
TextView
tvBase5
;
@BindView
(
R
.
id
.
rv_from
)
RecyclerView
rvFrom
;
@BindView
(
R
.
id
.
rv_to
)
RecyclerView
rvTo
;
@BindView
(
R
.
id
.
et_remark
)
EditText
etRemark
;
@BindView
(
R
.
id
.
tv_remark_num
)
TextView
tvRemarkNum
;
private
ProTargetAddAdapter
toAdapter
;
private
Map
<
String
,
Object
>
param
;
private
List
<
JSONObject
>
packageTargetList
;
private
List
<
ProductBean
.
RecordsBean
>
toList
;
private
List
<
ProAddBean
.
RecordsBean
>
fromList
;
private
List
<
JSONObject
>
packageSourceList
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvFrom
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
rvTo
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
fromList
=
new
ArrayList
<>();
ProAddAdapter
fromAdapter
=
new
ProAddAdapter
(
R
.
layout
.
item_product_add_pro
,
fromList
,
1
);
fromAdapter
.
bindToRecyclerView
(
rvFrom
);
fromList
.
addAll
(
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"from"
),
ProAddBean
.
RecordsBean
.
class
));
fromAdapter
.
notifyDataSetChanged
();
toList
=
new
ArrayList
<>();
toAdapter
=
new
ProTargetAddAdapter
(
R
.
layout
.
item_product_target_pro
,
toList
,
1
);
toAdapter
.
bindToRecyclerView
(
rvTo
);
toList
.
addAll
(
JSON
.
parseArray
(
getIntent
().
getStringExtra
(
"to"
),
ProductBean
.
RecordsBean
.
class
));
toAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
param
=
new
HashMap
<>();
param
.
put
(
"usedStockId"
,
getIntent
().
getStringExtra
(
"usedStockId"
));
param
.
put
(
"targetStockId"
,
getIntent
().
getStringExtra
(
"targetStockId"
));
param
.
put
(
"enterStockId"
,
getIntent
().
getStringExtra
(
"usedStockId"
));
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
JSONObject
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"base"
));
tvBase1
.
setText
(
data
.
getString
(
"1"
));
tvBase2
.
setText
(
data
.
getString
(
"2"
));
tvBase3
.
setText
(
data
.
getString
(
"3"
));
tvBase4
.
setText
(
data
.
getString
(
"4"
));
}
/**
* 转换pro,生成上传参数
*
* @param proList
* @return
*/
private
List
<
JSONObject
>
coverToInfo
(
List
<
ProductBean
.
RecordsBean
>
proList
)
{
List
<
JSONObject
>
orderItems
=
new
ArrayList
<>();
for
(
ProductBean
.
RecordsBean
recordsBean
:
proList
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
"quantity"
,
recordsBean
.
getCarNum
());
data
.
put
(
"productId"
,
recordsBean
.
getId
());
data
.
put
(
"outerPrice"
,
recordsBean
.
getCarPrice
());
orderItems
.
add
(
data
);
}
return
orderItems
;
}
@Override
protected
void
initEvent
()
{
addNumListener
(
etRemark
,
tvRemarkNum
);
}
/**
* 添加字数监听器
*
* @param et
* @param tv
*/
private
void
addNumListener
(
EditText
et
,
TextView
tv
)
{
et
.
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
)
{
tv
.
setText
(
s
.
length
()
+
"/140"
);
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_product_confirm
;
}
@OnClick
({
R
.
id
.
tv_ok
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_ok
:
packageTargetList
=
coverToInfo
(
toList
);
packageSourceList
=
coverFromInfo
(
fromList
);
submitOrder
();
break
;
}
}
private
List
<
JSONObject
>
coverFromInfo
(
List
<
ProAddBean
.
RecordsBean
>
fromList
)
{
List
<
JSONObject
>
orderItems
=
new
ArrayList
<>();
for
(
ProAddBean
.
RecordsBean
recordsBean
:
fromList
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
"orderType"
,
recordsBean
.
getOrderType
());
data
.
put
(
"orderId"
,
recordsBean
.
getOrderId
());
data
.
put
(
"quantity"
,
recordsBean
.
getCarNum
());
data
.
put
(
"productId"
,
recordsBean
.
getProductId
());
data
.
put
(
"orderItemId"
,
recordsBean
.
getSerialNumber
());
data
.
put
(
"stockId"
,
getIntent
().
getStringExtra
(
"usedStockId"
));
orderItems
.
add
(
data
);
}
return
orderItems
;
}
/**
* 下单
*/
private
void
submitOrder
()
{
param
.
put
(
"packageTargetList"
,
packageTargetList
);
param
.
put
(
"packageSourceList"
,
packageSourceList
);
param
.
put
(
"applyRemark"
,
etRemark
.
getText
().
toString
());
showLoading
();
RtfUtils
.
getRtf
().
submitProcedureOrder
(
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
toast
(
"下单成功"
);
startActivity
(
StoreOrderSuccessActivity
.
class
);
}
});
}
private
void
changeNumAndPrice
()
{
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
toList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()
+
""
,
recordsBean
.
getInternalPrice
()
+
""
,
3
),
3
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
tvBase5
.
setText
(
String
.
valueOf
(
allPrice
));
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductOrderAddActivity.java
0 → 100644
浏览文件 @
4b8bfe29
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.WarehoustBean
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
/**
* 添加组装订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ProductOrderAddActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_next
)
TextView
tvNext
;
@BindView
(
R
.
id
.
tv_client
)
TextView
tvClient
;
@BindView
(
R
.
id
.
rl_client
)
LinearLayout
rlClient
;
@BindView
(
R
.
id
.
tv_from_stock
)
TextView
tvFromStock
;
@BindView
(
R
.
id
.
rl_from_stock
)
LinearLayout
rlFromStock
;
@BindView
(
R
.
id
.
tv_to_stock
)
TextView
tvToStock
;
@BindView
(
R
.
id
.
rl_to_stock
)
LinearLayout
rlToStock
;
@BindView
(
R
.
id
.
tv_use_stock
)
TextView
tvUseStock
;
@BindView
(
R
.
id
.
rl_use_stock
)
LinearLayout
rlUseStock
;
private
Map
<
String
,
Object
>
param
;
private
Integer
clientId
;
private
List
<
String
>
stockNameList
=
new
ArrayList
<>();
private
List
<
WarehoustBean
.
RecordsBean
>
stockList
;
private
QMUIDialog
.
MenuDialogBuilder
fromStockDialog
;
private
QMUIDialog
.
MenuDialogBuilder
useStockDialog
;
private
WarehoustBean
.
RecordsBean
chooseFromStock
;
private
WarehoustBean
.
RecordsBean
useFromStock
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"deptId"
,
UserKeeper
.
getInstance
().
getUserDepId
());
param
.
put
(
"sign"
,
"SEND"
);
fromStockDialog
=
DialogUtils
.
listDialog
(
this
);
useStockDialog
=
DialogUtils
.
listDialog
(
this
);
}
@Override
protected
void
initData
()
{
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_product_order_add
;
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
10001
&&
resultCode
==
10001
)
{
String
clientName
=
data
.
getStringExtra
(
"clientName"
);
clientId
=
data
.
getIntExtra
(
"id"
,
0
);
tvClient
.
setText
(
clientName
);
param
.
put
(
"customerId"
,
clientId
);
getData
();
}
}
@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
();
}
@OnClick
({
R
.
id
.
rl_client
,
R
.
id
.
rl_from_stock
,
R
.
id
.
tv_next
,
R
.
id
.
rl_use_stock
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
rl_client
:
startActivityForResult
(
StoreSaleClientActivity
.
class
,
10001
,
"flag"
,
"1"
,
"depId"
,
UserKeeper
.
getInstance
().
getUserDepId
(),
"code"
,
"CUSTOMER"
);
break
;
case
R
.
id
.
rl_from_stock
:
if
(
clientId
==
null
)
{
toast
(
"请先选择客户"
);
return
;
}
fromStockDialog
.
show
();
break
;
case
R
.
id
.
tv_next
:
if
(
clientId
==
null
)
{
toast
(
"请先选择客户"
);
return
;
}
if
(
fromStockDialog
==
null
)
{
toast
(
"请先选择来源仓库"
);
return
;
}
if
(
useFromStock
==
null
)
{
toast
(
"请先选择领用仓库"
);
return
;
}
JSONObject
base
=
new
JSONObject
();
base
.
put
(
"1"
,
tvClient
.
getText
().
toString
());
base
.
put
(
"2"
,
tvFromStock
.
getText
().
toString
());
base
.
put
(
"3"
,
tvToStock
.
getText
().
toString
());
base
.
put
(
"4"
,
tvUseStock
.
getText
().
toString
());
startActivity
(
ProductOrderProActivity
.
class
,
"base"
,
base
.
toJSONString
(),
"customerId"
,
clientId
.
toString
(),
"usedStockId"
,
useFromStock
.
getId
()
+
""
,
"targetStockId"
,
chooseFromStock
.
getId
()
+
""
);
break
;
case
R
.
id
.
rl_use_stock
:
if
(
clientId
==
null
)
{
toast
(
"请先选择客户"
);
return
;
}
useStockDialog
.
show
();
break
;
}
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
getStock
(
param
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
List
<
WarehoustBean
.
RecordsBean
>
getList
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
WarehoustBean
.
RecordsBean
.
class
);
stockList
=
getList
;
stockNameList
.
clear
();
for
(
WarehoustBean
.
RecordsBean
process
:
stockList
)
{
stockNameList
.
add
(
process
.
getName
());
}
fromStockDialog
.
addItems
(
stockNameList
.
toArray
(
new
String
[
stockNameList
.
size
()]),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
chooseFromStock
=
stockList
.
get
(
which
);
tvFromStock
.
setText
(
stockNameList
.
get
(
which
));
tvToStock
.
setText
(
stockNameList
.
get
(
which
));
dialog
.
dismiss
();
}
});
useStockDialog
.
addItems
(
stockNameList
.
toArray
(
new
String
[
stockNameList
.
size
()]),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
useFromStock
=
stockList
.
get
(
which
);
tvUseStock
.
setText
(
stockNameList
.
get
(
which
));
dialog
.
dismiss
();
}
});
}
});
}
}
\ No newline at end of file
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductOrderProActivity.java
0 → 100644
浏览文件 @
4b8bfe29
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
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.ProAddBean
;
import
com.wd.workoffice.bean.ProPriceBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
com.wd.workoffice.bean.TicketDetailBean
;
import
com.wd.workoffice.bean.event.CheckTicketEvent
;
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.activity.bat.work.WorkFinancialReceiveTicketSubmitActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkFinancialTicketSubmitActivity
;
import
com.wd.workoffice.ui.adapter.ProAddAdapter
;
import
com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
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
ProductOrderProActivity
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
<
ProAddBean
.
RecordsBean
>
clientList
;
private
ProAddAdapter
clientAdapter
;
private
int
page
=
1
;
private
List
<
ProAddBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
private
void
openDialog
(
ProAddBean
.
RecordsBean
data
,
int
position
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
View
view
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
view_choose_pro_from
,
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
);
AddAndReduceDoubleView
num
=
view
.
findViewById
(
R
.
id
.
ar_num
);
TextView
etPrice
=
view
.
findViewById
(
R
.
id
.
et_price
);
etPrice
.
setClickable
(
false
);
for
(
ProAddBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
data
.
getId
()
==
recordsBean
.
getId
())
{
// etPrice.setText(recordsBean.getCarPrice());
num
.
setNumber
(
Double
.
valueOf
(
recordsBean
.
getCarNum
()));
}
}
etPrice
.
setText
(
String
.
valueOf
(
data
.
getCanPackageSum
()));
num
.
setMaxNum
(
data
.
getCanPackageSum
());
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
num
.
getNumber
()
==
0
d
)
{
toast
(
"请填写数量"
);
return
;
}
clientList
.
get
(
position
).
setCarNum
(
String
.
valueOf
(
num
.
getNumber
()));
addCart
(
data
,
num
.
getNumber
());
tvNum
.
setText
(
"共 "
.
concat
(
clientList
.
size
()
+
""
).
concat
(
" 件"
));
addCartDialog
.
dismiss
();
}
});
tvCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
addCartDialog
.
dismiss
();
}
});
addCartDialog
.
show
();
}
/**
* 添加购物车
*
* @param chooseProduct 产品
* @param number 数量
*/
private
void
addCart
(
ProAddBean
.
RecordsBean
chooseProduct
,
double
number
)
{
boolean
isHas
=
false
;
for
(
ProAddBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
chooseProduct
.
getId
()
==
recordsBean
.
getId
())
{
isHas
=
true
;
recordsBean
.
setCarNum
(
String
.
valueOf
(
number
));
// recordsBean.setCarPrice(price);
}
}
if
(!
isHas
)
{
chooseProduct
.
setCarNum
(
String
.
valueOf
(
number
));
// chooseProduct.setCarPrice(price);
carList
.
add
(
chooseProduct
);
}
toast
(
"加入购物车成功"
);
}
@Override
protected
void
initData
()
{
clientList
=
new
ArrayList
<>();
clientAdapter
=
new
ProAddAdapter
(
R
.
layout
.
item_product_add_pro
,
clientList
);
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"current"
,
1
);
param
.
put
(
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
));
param
.
put
(
"tranFromStockId"
,
getIntent
().
getStringExtra
(
"targetStockId"
));
getData
();
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
saleOrderPro
(
param
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
List
<
ProAddBean
.
RecordsBean
>
dataList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
ProAddBean
.
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_product_add_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
(
ProductOrderProTargetActivity
.
class
,
"base"
,
getIntent
().
getStringExtra
(
"base"
),
"usedStockId"
,
getIntent
().
getStringExtra
(
"usedStockId"
),
"targetStockId"
,
getIntent
().
getStringExtra
(
"targetStockId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"from"
,
JSON
.
toJSONString
(
carList
));
break
;
case
R
.
id
.
btn_search
:
param
.
put
(
"name"
,
etKey
.
getText
().
toString
());
param
.
put
(
"current"
,
1
);
page
=
1
;
getData
();
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/order/ProductOrderProTargetActivity.java
0 → 100644
浏览文件 @
4b8bfe29
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
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.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.ProductBean
;
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.activity.bat.work.WorkFinancialReceiveTicketSubmitActivity
;
import
com.wd.workoffice.ui.activity.bat.work.WorkFinancialTicketSubmitActivity
;
import
com.wd.workoffice.ui.adapter.ProTargetAddAdapter
;
import
com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
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
ProductOrderProTargetActivity
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
<
ProductBean
.
RecordsBean
>
clientList
;
private
ProTargetAddAdapter
clientAdapter
;
private
int
page
=
1
;
private
List
<
ProductBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
private
void
openDialog
(
ProductBean
.
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
(
ProductBean
.
RecordsBean
recordsBean
:
carList
)
{
if
(
data
.
getId
()
==
recordsBean
.
getId
())
{
etPrice
.
setText
(
recordsBean
.
getCarPrice
());
num
.
setNumber
(
Integer
.
valueOf
(
recordsBean
.
getCarNum
()));
}
}
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
());
tvNum
.
setText
(
"共 "
.
concat
(
carList
.
size
()
+
""
).
concat
(
" 件"
));
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
(
ProductBean
.
RecordsBean
chooseProduct
,
int
number
,
String
price
)
{
boolean
isHas
=
false
;
for
(
ProductBean
.
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
ProTargetAddAdapter
(
R
.
layout
.
item_product_target_pro
,
clientList
);
clientAdapter
.
bindToRecyclerView
(
rvProduct
);
param
=
WorkUtils
.
pageKey
();
param
.
put
(
"current"
,
1
);
param
.
put
(
"transitPartId"
,
getIntent
().
getStringExtra
(
"customerId"
));
getData
();
}
private
void
getData
()
{
RtfUtils
.
getRtf
().
saleOrderTargetPro
(
param
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
List
<
ProductBean
.
RecordsBean
>
dataList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
ProductBean
.
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_product_add_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
(
ProductConfirmActivity
.
class
,
"base"
,
getIntent
().
getStringExtra
(
"base"
),
"usedStockId"
,
getIntent
().
getStringExtra
(
"usedStockId"
),
"targetStockId"
,
getIntent
().
getStringExtra
(
"targetStockId"
),
"customerId"
,
getIntent
().
getStringExtra
(
"customerId"
),
"to"
,
JSON
.
toJSONString
(
carList
),
"from"
,
getIntent
().
getStringExtra
(
"from"
));
break
;
case
R
.
id
.
btn_search
:
param
.
put
(
"name"
,
etKey
.
getText
().
toString
());
param
.
put
(
"current"
,
1
);
page
=
1
;
getData
();
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/order/ReturnApplyActivity.java
浏览文件 @
4b8bfe29
...
...
@@ -67,7 +67,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
page
=
1
;
param
.
put
(
"current"
,
page
);
param
.
put
(
"orderId"
,
getIntent
().
getStringExtra
(
"orderId"
));
//
param.put("productId", getIntent().getStringExtra("productId"));
param
.
put
(
"productId"
,
getIntent
().
getStringExtra
(
"productId"
));
getData
();
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/sale/SaleProductOrderActivity.java
浏览文件 @
4b8bfe29
...
...
@@ -7,6 +7,7 @@ import android.view.MenuItem;
import
com.google.android.material.tabs.TabLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.ui.activity.bat.order.ProductOrderAddActivity
;
import
com.wd.workoffice.ui.activity.bat.order.ProductOrderSearchActivity
;
import
com.wd.workoffice.ui.adapter.VpDataAdapter
;
import
com.wd.workoffice.ui.fg.ProductOrderApplyFragment
;
...
...
@@ -85,7 +86,7 @@ public class SaleProductOrderActivity extends WorkToolBarActivity {
startActivity
(
ProductOrderSearchActivity
.
class
,
"identity"
,
getIntent
().
getStringExtra
(
"identity"
));
break
;
case
R
.
id
.
add
:
startActivity
(
ProductOrder
Search
Activity
.
class
,
"identity"
,
getIntent
().
getStringExtra
(
"identity"
));
startActivity
(
ProductOrder
Add
Activity
.
class
,
"identity"
,
getIntent
().
getStringExtra
(
"identity"
));
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/ProAddAdapter.java
0 → 100644
浏览文件 @
4b8bfe29
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.ProAddBean
;
import
com.wd.workoffice.bean.TicketAddBean
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
ProAddAdapter
extends
BaseQuickAdapter
<
ProAddBean
.
RecordsBean
,
BaseViewHolder
>
{
int
type
;
//0,add 1,submit
public
ProAddAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
public
ProAddAdapter
(
int
layoutResId
,
@Nullable
List
<
ProAddBean
.
RecordsBean
>
data
,
int
type
)
{
super
(
layoutResId
,
data
);
this
.
type
=
type
;
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ProAddBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getProductName
());
helper
.
setText
(
R
.
id
.
tv_order
,
item
.
getOrderId
());
helper
.
setText
(
R
.
id
.
tv_order_type
,
item
.
getOrderTypeName
());
helper
.
setText
(
R
.
id
.
tv_pd_code
,
item
.
getSerialNumber
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getProductSpec
());
helper
.
setText
(
R
.
id
.
tv_unit
,
item
.
getProductUnit
());
helper
.
setText
(
R
.
id
.
tv_apply_num
,
item
.
getCanPackageSum
()
+
""
);
if
(
type
==
1
)
{
helper
.
setVisible
(
R
.
id
.
iv_cart
,
false
);
}
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/ProTargetAddAdapter.java
0 → 100644
浏览文件 @
4b8bfe29
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.ProAddBean
;
import
com.wd.workoffice.bean.ProductBean
;
import
java.util.List
;
import
androidx.annotation.Nullable
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
ProTargetAddAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
int
type
;
//0,add 1,submit
public
ProTargetAddAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
public
ProTargetAddAdapter
(
int
layoutResId
,
@Nullable
List
<
ProductBean
.
RecordsBean
>
data
,
int
type
)
{
super
(
layoutResId
,
data
);
this
.
type
=
type
;
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ProductBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_in_price
,
String
.
valueOf
(
item
.
getInternalPrice
()));
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_num
,
item
.
getCarNum
()
+
""
);
helper
.
setText
(
R
.
id
.
tv_price
,
item
.
getCarPrice
()
);
if
(
type
==
1
)
{
helper
.
setVisible
(
R
.
id
.
iv_cart
,
false
);
}
}
}
app/src/main/res/layout/activity_product_add_pro.xml
0 → 100644
浏览文件 @
4b8bfe29
<?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>
app/src/main/res/layout/activity_product_confirm.xml
0 → 100644
浏览文件 @
4b8bfe29
<?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"
>
<RelativeLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"60mm"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_marginLeft=
"15mm"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:text=
"总计: ¥ "
android:textSize=
"16sp"
/>
</LinearLayout>
<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>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
android:background=
"@color/white"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
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=
"16sp"
/>
</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:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"所属客户"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_base1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
</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=
"14sp"
/>
<TextView
android:id=
"@+id/tv_base2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
</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=
"14sp"
/>
<TextView
android:id=
"@+id/tv_base3"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
</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=
"14sp"
/>
<TextView
android:id=
"@+id/tv_base4"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"销售二公司"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
</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=
"14sp"
/>
<TextView
android:id=
"@+id/tv_base5"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"销售二公司"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
</RelativeLayout>
<View
style=
"@style/dividerX"
/>
<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=
"16sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_from"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<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=
"16sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_to"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<View
style=
"@style/ViewX"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"运输方式及费用承担:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:background=
"@drawable/shape_confirm_order"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18mm"
android:paddingVertical=
"15mm"
android:text=
"备注:"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
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>
\ No newline at end of file
app/src/main/res/layout/activity_product_order_add.xml
0 → 100644
浏览文件 @
4b8bfe29
<?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"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_next"
android:layout_width=
"match_parent"
android:layout_height=
"48mm"
android:layout_alignParentBottom=
"true"
android:background=
"#5C768A"
android:gravity=
"center"
android:text=
"下一步,选择产品来源"
android:textColor=
"@color/white"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/tv_next"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/rl_client"
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=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:background=
"#ff3f617f"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"选择客户"
android:textSize=
"15sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
android:id=
"@+id/tv_client"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10mm"
android:maxLines=
"1"
android:text=
"请选择客户"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/rl_from_stock"
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=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:background=
"#C45D5D"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"来源仓库"
android:textSize=
"15sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"3mm"
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
android:id=
"@+id/tv_from_stock"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"请选择来源仓库"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/rl_to_stock"
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=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:layout_centerVertical=
"true"
android:background=
"#E3AD6E"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"目标仓库"
android:textSize=
"15sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"3mm"
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
android:id=
"@+id/tv_to_stock"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"请选择目标客户"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/rl_use_stock"
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=
"22mm"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:gravity=
"center_vertical"
>
<View
android:layout_width=
"12mm"
android:layout_height=
"12mm"
android:layout_centerVertical=
"true"
android:background=
"#37A999"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"领用仓库"
android:textSize=
"15sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"3mm"
android:layout_weight=
"1"
android:gravity=
"center_vertical|right"
>
<TextView
android:id=
"@+id/tv_use_stock"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"请选择领用仓库"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"6mm"
android:layout_height=
"10mm"
android:layout_marginLeft=
"10mm"
android:layout_gravity=
"center_vertical"
android:background=
"@mipmap/arrow_right_blue"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_product_add_pro.xml
0 → 100644
浏览文件 @
4b8bfe29
<?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_order_type"
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_pd_code"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"规格"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_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>
<ImageView
android:id=
"@+id/iv_cart"
android:layout_width=
"25mm"
android:layout_height=
"25mm"
android:layout_gravity=
"right"
android:src=
"@mipmap/ticket_add_cart"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_product_target_pro.xml
0 → 100644
浏览文件 @
4b8bfe29
<?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: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_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_in_price"
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:id=
"@+id/iv_cart"
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_choose_pro_from.xml
0 → 100644
浏览文件 @
4b8bfe29
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#d1f8f8f8"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20mm"
android:gravity=
"center"
android:text=
"选择产品来源"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<LinearLayout
android:id=
"@+id/ll_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30mm"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"可申请数量"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<TextView
android:id=
"@+id/et_price"
android:layout_width=
"match_parent"
android:layout_height=
"30mm"
android:layout_marginLeft=
"10mm"
android:background=
"@drawable/shape_add_cart"
android:gravity=
"right|center_vertical"
android:inputType=
"numberDecimal"
android:paddingHorizontal=
"10mm"
android:paddingVertical=
"4mm"
android:textColor=
"@color/flexible_text_sup"
android:textColorHint=
"#91ABBA"
android:textSize=
"16sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"25mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingHorizontal=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"选择数量"
android:textColor=
"@color/flexible_text_sup"
android:textSize=
"17sp"
/>
<com.wd.workoffice.widget.AddAndReduceDoubleView
android:id=
"@+id/ar_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30mm"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_cancel"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:paddingVertical=
"15mm"
android:text=
"取消"
android:textColor=
"#007AFF"
android:textSize=
"17sp"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:background=
"#D8DCE6"
/>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:paddingVertical=
"15mm"
android:text=
"确定"
android:textColor=
"#007AFF"
android:textSize=
"17sp"
/>
</LinearLayout>
</LinearLayout>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论