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
67af8061
提交
67af8061
authored
3月 15, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.bat页面商店第一个页面,购物车页面
2.//TODO erp用户激活,忘记密码测试,bat,mes,消息,我的,刷新token
上级
71b0faa8
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
681 行增加
和
5 行删除
+681
-5
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-0
ProductBean.java
app/src/main/java/com/wd/workoffice/bean/ProductBean.java
+18
-0
ModifyCarEvent.java
...ain/java/com/wd/workoffice/bean/event/ModifyCarEvent.java
+22
-0
StoreSaleCarActivity.java
...m/wd/workoffice/ui/activity/bat/StoreSaleCarActivity.java
+129
-0
StoreSaleProductActivity.java
.../workoffice/ui/activity/bat/StoreSaleProductActivity.java
+59
-2
StoreCarAdapter.java
...in/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
+79
-0
BaseGlideMoudle.java
...src/main/java/com/wd/workoffice/util/BaseGlideMoudle.java
+27
-0
DialogUtils.java
app/src/main/java/com/wd/workoffice/util/DialogUtils.java
+4
-0
MathUtils.java
app/src/main/java/com/wd/workoffice/util/MathUtils.java
+39
-0
activity_bat_shopcar.xml
app/src/main/res/layout/activity_bat_shopcar.xml
+60
-0
item_store_car.xml
app/src/main/res/layout/item_store_car.xml
+232
-0
item_store_product.xml
app/src/main/res/layout/item_store_product.xml
+1
-1
view_add_cart.xml
app/src/main/res/layout/view_add_cart.xml
+2
-2
colors.xml
app/src/main/res/values/colors.xml
+1
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
67af8061
...
...
@@ -121,6 +121,14 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.bat.StoreSaleCarActivity"
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/ProductBean.java
浏览文件 @
67af8061
...
...
@@ -165,6 +165,24 @@ public class ProductBean {
private
Object
transitPartId
;
private
Object
transitPartTypeCode
;
private
Object
remark
;
private
String
carPrice
;
private
int
carNum
;
public
String
getCarPrice
()
{
return
carPrice
;
}
public
void
setCarPrice
(
String
carPrice
)
{
this
.
carPrice
=
carPrice
;
}
public
int
getCarNum
()
{
return
carNum
;
}
public
void
setCarNum
(
int
carNum
)
{
this
.
carNum
=
carNum
;
}
public
int
getCreatedBy
()
{
return
createdBy
;
...
...
app/src/main/java/com/wd/workoffice/bean/event/ModifyCarEvent.java
0 → 100644
浏览文件 @
67af8061
package
com
.
wd
.
workoffice
.
bean
.
event
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
ModifyCarEvent
{
String
pro
;
public
ModifyCarEvent
(
String
pro
)
{
this
.
pro
=
pro
;
}
public
String
getPro
()
{
return
pro
;
}
public
void
setPro
(
String
pro
)
{
this
.
pro
=
pro
;
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/StoreSaleCarActivity.java
0 → 100644
浏览文件 @
67af8061
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
;
import
android.view.View
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.ui.adapter.StoreCarAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.MathUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.ArrayList
;
import
java.util.List
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
/**
* 商店-销售-购物车
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
StoreSaleCarActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R
.
id
.
tv_ok
)
TextView
tvOk
;
@BindView
(
R
.
id
.
ll_bottom
)
RelativeLayout
llBottom
;
@BindView
(
R
.
id
.
rv_product
)
RecyclerView
rvProduct
;
private
List
<
ProductBean
.
RecordsBean
>
productList
;
private
StoreCarAdapter
productAdapter
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
rvProduct
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
productList
=
new
ArrayList
<>();
productAdapter
=
new
StoreCarAdapter
(
R
.
layout
.
item_store_car
,
productList
);
productAdapter
.
bindToRecyclerView
(
rvProduct
);
String
pro
=
getIntent
().
getStringExtra
(
"pro"
);
productList
.
addAll
(
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
productAdapter
.
notifyDataSetChanged
();
changeNumAndPrice
();
}
@Override
protected
void
initEvent
()
{
productAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
QMUIDialog
.
MessageDialogBuilder
dialog
=
DialogUtils
.
okAndCancelDialog
(
StoreSaleCarActivity
.
this
);
dialog
.
setMessage
(
"是否删除"
).
addAction
(
"取消"
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
}
}).
addAction
(
"确定"
,
new
QMUIDialogAction
.
ActionListener
()
{
@Override
public
void
onClick
(
QMUIDialog
dialog
,
int
index
)
{
dialog
.
dismiss
();
productList
.
remove
(
position
);
productAdapter
.
notifyDataSetChanged
();
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
productList
)));
}
}).
show
();
}
});
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_bat_shopcar
;
}
@OnClick
(
R
.
id
.
tv_ok
)
public
void
onViewClicked
()
{
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
onMessageEvent
(
ModifyCarEvent
event
)
{
changeNumAndPrice
();
}
private
void
changeNumAndPrice
()
{
tvNum
.
setText
(
"共 "
.
concat
(
productList
.
size
()+
""
).
concat
(
" 件"
));
String
allPrice
=
""
;
for
(
ProductBean
.
RecordsBean
recordsBean
:
productList
)
{
allPrice
=
MathUtils
.
add
(
allPrice
,
MathUtils
.
multiply
(
recordsBean
.
getCarNum
()+
""
,
recordsBean
.
getCarPrice
(),
2
),
2
);
}
tvPrice
.
setText
(
"总计: ¥ "
.
concat
(
allPrice
));
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/StoreSaleProductActivity.java
浏览文件 @
67af8061
...
...
@@ -16,6 +16,7 @@ import com.wd.workoffice.app.BaseBean;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ProcessBean
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.workEnum.PermissType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
...
...
@@ -23,6 +24,10 @@ import com.wd.workoffice.ui.adapter.StoreProcductAdapter;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -64,6 +69,7 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
private
List
<
ProductBean
.
RecordsBean
>
clientList
;
private
StoreProcductAdapter
clientAdapter
;
private
int
page
=
1
;
private
List
<
ProductBean
.
RecordsBean
>
carList
=
new
ArrayList
<>();
@Override
protected
void
initView
()
{
...
...
@@ -74,13 +80,25 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
tvProcess
.
setText
(
"订单流程:"
+
getIntent
().
getStringExtra
(
"process"
));
}
private
void
openDialog
(
ProductBean
.
RecordsBean
recordsBean
)
{
@Override
protected
void
onResume
()
{
super
.
onResume
();
}
private
void
openDialog
(
ProductBean
.
RecordsBean
data
)
{
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
);
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
(
recordsBean
.
getCarNum
());
}
}
builder
.
setView
(
view
);
AlertDialog
addCartDialog
=
builder
.
create
();
tvOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
@@ -90,7 +108,7 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
toast
(
"请填写外部价格"
);
return
;
}
addCart
(
recordsBean
,
num
.
getNumber
(),
etPrice
.
getText
().
toString
());
addCart
(
data
,
num
.
getNumber
(),
etPrice
.
getText
().
toString
());
addCartDialog
.
dismiss
();
}
});
...
...
@@ -112,6 +130,20 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
* @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
...
...
@@ -199,6 +231,11 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
R
.
id
.
cart
:
if
(
carList
.
size
()
==
0
)
{
toast
(
"购物车没有产品"
);
return
super
.
onOptionsItemSelected
(
item
);
}
startActivity
(
StoreSaleCarActivity
.
class
,
"pro"
,
JSON
.
toJSONString
(
carList
));
break
;
}
return
super
.
onOptionsItemSelected
(
item
);
...
...
@@ -219,4 +256,24 @@ public class StoreSaleProductActivity extends WorkToolBarActivity {
break
;
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
onMessageEvent
(
ModifyCarEvent
event
)
{
String
pro
=
event
.
getPro
();
carList
.
clear
();
carList
.
addAll
(
JSON
.
parseArray
(
pro
,
ProductBean
.
RecordsBean
.
class
));
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/StoreCarAdapter.java
0 → 100644
浏览文件 @
67af8061
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.EditText
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.List
;
import
flexible.xd.android_base.utils.ToastUtil
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
StoreCarAdapter
extends
BaseQuickAdapter
<
ProductBean
.
RecordsBean
,
BaseViewHolder
>
{
public
StoreCarAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ProductBean
.
RecordsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getSimpleCode
());
helper
.
setText
(
R
.
id
.
tv_card
,
item
.
getSoleCode
());
helper
.
setText
(
R
.
id
.
tv_card_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_spec
,
item
.
getSpec
());
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
.
concat
(
String
.
valueOf
(
item
.
getInternalPrice
())));
helper
.
setText
(
R
.
id
.
tv_unit
,
String
.
valueOf
(
item
.
getWeight
()).
concat
(
"吨"
));
helper
.
addOnClickListener
(
R
.
id
.
tv_delete
);
AddAndReduceView
num
=
helper
.
getView
(
R
.
id
.
ar_num
);
num
.
setOnNumberChangedListener
(
new
AddAndReduceView
.
OnNumberChangedListener
()
{
@Override
public
void
OnNumberChanged
(
int
vs
)
{
item
.
setCarNum
(
vs
);
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
vs
+
""
,
item
.
getCarPrice
(),
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
EditText
etPrice
=
helper
.
getView
(
R
.
id
.
et_price
);
etPrice
.
setText
(
item
.
getCarPrice
());
etPrice
.
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
)
{
if
(
TextUtils
.
isEmpty
(
s
)){
ToastUtil
.
showShort
(
"请输入外部单价"
);
return
;
}
item
.
setCarPrice
(
s
.
toString
());
helper
.
setText
(
R
.
id
.
tv_all_price
,
MathUtils
.
multiply
(
item
.
getCarNum
()+
""
,
item
.
getCarPrice
(),
2
));
EventBus
.
getDefault
().
post
(
new
ModifyCarEvent
(
JSON
.
toJSONString
(
getData
())));
}
});
num
.
setNumber
(
item
.
getCarNum
());
}
}
app/src/main/java/com/wd/workoffice/util/BaseGlideMoudle.java
0 → 100644
浏览文件 @
67af8061
package
com
.
wd
.
workoffice
.
util
;
import
android.content.Context
;
import
com.bumptech.glide.GlideBuilder
;
import
com.bumptech.glide.annotation.GlideModule
;
import
com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool
;
import
com.bumptech.glide.load.engine.cache.LruResourceCache
;
import
com.bumptech.glide.module.AppGlideModule
;
/**
* Created by Flexible on 2018/2/1 0001.
*/
@GlideModule
public
final
class
BaseGlideMoudle
extends
AppGlideModule
{
@Override
public
void
applyOptions
(
Context
context
,
GlideBuilder
builder
)
{
builder
.
setMemoryCache
(
new
LruResourceCache
(
10
*
1024
*
1024
));
builder
.
setBitmapPool
(
new
LruBitmapPool
(
10
*
1024
*
1024
));
}
@Override
public
boolean
isManifestParsingEnabled
()
{
return
false
;
}
}
\ No newline at end of file
app/src/main/java/com/wd/workoffice/util/DialogUtils.java
浏览文件 @
67af8061
...
...
@@ -14,4 +14,8 @@ public class DialogUtils {
QMUIDialog
.
MenuDialogBuilder
dialog
=
new
QMUIDialog
.
MenuDialogBuilder
(
context
);
return
dialog
;
}
public
static
QMUIDialog
.
MessageDialogBuilder
okAndCancelDialog
(
Context
context
)
{
QMUIDialog
.
MessageDialogBuilder
dialog
=
new
QMUIDialog
.
MessageDialogBuilder
(
context
);
return
dialog
;
}
}
app/src/main/java/com/wd/workoffice/util/MathUtils.java
0 → 100644
浏览文件 @
67af8061
package
com
.
wd
.
workoffice
.
util
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
java.math.BigDecimal
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
MathUtils
{
public
static
String
multiply
(
String
v1
,
String
v2
,
Integer
scale
)
{
if
(
TextUtils
.
isEmpty
(
v1
))
{
v1
=
"0"
;
}
if
(
TextUtils
.
isEmpty
(
v2
))
{
v2
=
"0"
;
}
BigDecimal
b1
=
new
BigDecimal
(
v1
.
trim
());
BigDecimal
b2
=
new
BigDecimal
(
v2
.
trim
());
return
b1
.
multiply
(
b2
).
setScale
(
scale
).
toString
();
}
public
static
String
add
(
String
v1
,
String
v2
,
Integer
scale
)
{
if
(
TextUtils
.
isEmpty
(
v1
))
{
v1
=
"0"
;
}
if
(
TextUtils
.
isEmpty
(
v2
))
{
v2
=
"0"
;
}
BigDecimal
b1
=
new
BigDecimal
(
v1
.
trim
());
BigDecimal
b2
=
new
BigDecimal
(
v2
.
trim
());
return
b1
.
add
(
b2
).
setScale
(
scale
).
toString
();
}
}
app/src/main/res/layout/activity_bat_shopcar.xml
0 → 100644
浏览文件 @
67af8061
<?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"
>
<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_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"共 0 件"
android:textSize=
"13sp"
/>
<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.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_product"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_store_car.xml
0 → 100644
浏览文件 @
67af8061
<?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:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"10mm"
>
<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_alignParentLeft=
"true"
android:text=
"图号TH82739857"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_delete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:paddingHorizontal=
"5mm"
android:text=
"删除"
android:textColor=
"@color/red_btn_bg"
android:textSize=
"14sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:padding=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"品名"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_card_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"规格"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_spec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"内部单价"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:text=
"单位"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_unit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:text=
"品号"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"12sp"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"30mm"
android:orientation=
"horizontal"
>
<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"
/>
<EditText
android:id=
"@+id/et_price"
android:layout_width=
"150mm"
android:layout_height=
"30mm"
android:layout_marginLeft=
"10mm"
android:background=
"@drawable/shape_add_cart"
android:gravity=
"right|center_vertical"
android:hint=
"¥0.00"
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=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right|center_vertical"
android:layout_marginTop=
"25mm"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<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.AddAndReduceView
android:id=
"@+id/ar_num"
android:layout_width=
"150mm"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"30mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"小计: ¥ "
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_all_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"2300.00"
android:textSize=
"14sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_store_product.xml
浏览文件 @
67af8061
...
...
@@ -17,7 +17,7 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
0
mm"
android:layout_marginTop=
"1
4
mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:padding=
"10mm"
>
...
...
app/src/main/res/layout/view_add_cart.xml
浏览文件 @
67af8061
...
...
@@ -37,11 +37,11 @@
android:layout_height=
"30mm"
android:layout_marginLeft=
"10mm"
android:background=
"@drawable/shape_add_cart"
android:gravity=
"right"
android:gravity=
"right
|center_vertical
"
android:hint=
"预计开票单价"
android:inputType=
"numberDecimal"
android:paddingVertical=
"4mm"
android:paddingHorizontal=
"10mm"
android:paddingVertical=
"4mm"
android:textColor=
"@color/flexible_text_sup"
android:textColorHint=
"#91ABBA"
android:textSize=
"16sp"
/>
...
...
app/src/main/res/values/colors.xml
浏览文件 @
67af8061
...
...
@@ -9,4 +9,5 @@
<color
name=
"main_icon"
>
#C3CED7
</color>
<color
name=
"flexible_background"
>
#fff6f9fb
</color>
<color
name=
"input_background"
>
#F0F5F8
</color>
<color
name=
"red_btn_bg"
>
#C45D5D
</color>
</resources>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论