Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
af85c47f
Commit
af85c47f
authored
Aug 24, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 订单详情联系卖家逻辑
parent
5d3d7708
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
34 deletions
+42
-34
AndroidManifest.xml
CommonLib/BCommon/src/main/AndroidManifest.xml
+2
-0
OrderDetailDto.kt
...java/com/yidian/shenghuoquan/border/dto/OrderDetailDto.kt
+28
-28
OrderCommodityInfoViewModel.kt
...nghuoquan/border/viewmodel/OrderCommodityInfoViewModel.kt
+10
-2
border_item_order_detail_commodity_list.xml
...in/res/layout/border_item_order_detail_commodity_list.xml
+1
-1
border_view_order_commodity_info.xml
.../src/main/res/layout/border_view_order_commodity_info.xml
+1
-3
No files found.
CommonLib/BCommon/src/main/AndroidManifest.xml
View file @
af85c47f
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
<!--高德地图 允许程序访问CellID或WiFi热点来获取的位置-->
<!--高德地图 允许程序访问CellID或WiFi热点来获取的位置-->
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<!--允许程序拔打电话-->
<uses-permission
android:name=
"android.permission.CALL_PHONE"
/>
<application>
<application>
...
...
Components/BOrder/src/main/java/com/yidian/shenghuoquan/border/dto/OrderDetailDto.kt
View file @
af85c47f
...
@@ -13,19 +13,19 @@ data class OrderDetailDto(
...
@@ -13,19 +13,19 @@ data class OrderDetailDto(
val
appid
:
String
,
val
appid
:
String
,
@SerializedName
(
"audit_status"
)
@SerializedName
(
"audit_status"
)
val
auditStatus
:
Int
,
val
auditStatus
:
Int
,
@SerializedName
(
"audit_time"
)
@SerializedName
(
"audit_time"
)
// 审核时间,商家拒绝退款时间取此字段
val
auditTime
:
String
,
val
auditTime
:
String
,
@SerializedName
(
"business_from"
)
@SerializedName
(
"business_from"
)
val
businessFrom
:
Int
,
val
businessFrom
:
Int
,
@SerializedName
(
"close_time"
)
@SerializedName
(
"close_time"
)
val
closeTime
:
String
,
val
closeTime
:
String
,
@SerializedName
(
"comment"
)
@SerializedName
(
"comment"
)
// 订单备注
val
comment
:
String
,
val
comment
:
String
,
@SerializedName
(
"coupon_list"
)
@SerializedName
(
"coupon_list"
)
// 优惠券信息
val
couponList
:
List
<
Coupon
>,
val
couponList
:
List
<
Coupon
>,
@SerializedName
(
"create_time"
)
@SerializedName
(
"create_time"
)
val
createTime
:
String
,
val
createTime
:
String
,
@SerializedName
(
"discount_fee"
)
@SerializedName
(
"discount_fee"
)
// 优惠金额
val
discountFee
:
Double
,
val
discountFee
:
Double
,
@SerializedName
(
"is_refund"
)
@SerializedName
(
"is_refund"
)
val
isRefund
:
Int
,
val
isRefund
:
Int
,
...
@@ -35,19 +35,19 @@ data class OrderDetailDto(
...
@@ -35,19 +35,19 @@ data class OrderDetailDto(
val
lifeAccountId
:
String
,
val
lifeAccountId
:
String
,
@SerializedName
(
"life_account_name"
)
@SerializedName
(
"life_account_name"
)
val
lifeAccountName
:
String
,
val
lifeAccountName
:
String
,
@SerializedName
(
"marketing_id"
)
@SerializedName
(
"marketing_id"
)
// 活动id
val
marketingId
:
Int
,
val
marketingId
:
Int
,
@SerializedName
(
"marketing_name"
)
@SerializedName
(
"marketing_name"
)
// 活动名称
val
marketingName
:
String
,
val
marketingName
:
String
,
@SerializedName
(
"merge_order_item_list"
)
@SerializedName
(
"merge_order_item_list"
)
val
mergeOrderItemList
:
List
<
MergeOrderItem
>,
val
mergeOrderItemList
:
List
<
MergeOrderItem
>,
@SerializedName
(
"order_id"
)
@SerializedName
(
"order_id"
)
// 订单id
val
orderId
:
String
,
val
orderId
:
String
,
@SerializedName
(
"order_item_list"
)
@SerializedName
(
"order_item_list"
)
val
orderItemList
:
List
<
OrderItem
>,
val
orderItemList
:
List
<
OrderItem
>,
@SerializedName
(
"order_shipping_info"
)
@SerializedName
(
"order_shipping_info"
)
// 收货人信息
val
orderShippingInfo
:
OrderShippingInfo
,
val
orderShippingInfo
:
OrderShippingInfo
,
@SerializedName
(
"order_status"
)
@SerializedName
(
"order_status"
)
// 订单状态
val
orderStatus
:
Int
,
val
orderStatus
:
Int
,
@SerializedName
(
"order_status_text"
)
@SerializedName
(
"order_status_text"
)
val
orderStatusText
:
String
,
val
orderStatusText
:
String
,
...
@@ -55,21 +55,21 @@ data class OrderDetailDto(
...
@@ -55,21 +55,21 @@ data class OrderDetailDto(
val
orderType
:
Int
,
val
orderType
:
Int
,
@SerializedName
(
"pay_expiration_time"
)
@SerializedName
(
"pay_expiration_time"
)
val
payExpirationTime
:
String
,
val
payExpirationTime
:
String
,
@SerializedName
(
"pay_time"
)
@SerializedName
(
"pay_time"
)
// 支付时间
val
payTime
:
String
,
val
payTime
:
String
,
@SerializedName
(
"payment"
)
@SerializedName
(
"payment"
)
// 支付金额
val
payment
:
Int
,
val
payment
:
Int
,
@SerializedName
(
"place_list"
)
@SerializedName
(
"place_list"
)
// 自提点信息
val
placeList
:
PlaceList
,
val
placeList
:
PlaceList
,
@SerializedName
(
"post_fee"
)
@SerializedName
(
"post_fee"
)
val
postFee
:
Int
,
val
postFee
:
Int
,
@SerializedName
(
"receive_time"
)
@SerializedName
(
"receive_time"
)
val
receiveTime
:
String
,
val
receiveTime
:
String
,
@SerializedName
(
"refund_amount"
)
@SerializedName
(
"refund_amount"
)
// 退款金额
val
refundAmount
:
Int
,
val
refundAmount
:
Int
,
@SerializedName
(
"refund_apply_time"
)
@SerializedName
(
"refund_apply_time"
)
// 退款申请时间
val
refundApplyTime
:
String
,
val
refundApplyTime
:
String
,
@SerializedName
(
"refund_finish_time"
)
@SerializedName
(
"refund_finish_time"
)
// 退款时间
val
refundFinishTime
:
String
,
val
refundFinishTime
:
String
,
@SerializedName
(
"shop_id"
)
@SerializedName
(
"shop_id"
)
val
shopId
:
String
,
val
shopId
:
String
,
...
@@ -112,7 +112,7 @@ data class Coupon(
...
@@ -112,7 +112,7 @@ data class Coupon(
data class
MergeOrderItem
(
data class
MergeOrderItem
(
@SerializedName
(
"desc_pic_url"
)
@SerializedName
(
"desc_pic_url"
)
val
descPicUrl
:
String
,
val
descPicUrl
:
List
<
String
>
,
@SerializedName
(
"goods_name"
)
@SerializedName
(
"goods_name"
)
val
goodsName
:
String
,
val
goodsName
:
String
,
@SerializedName
(
"goods_num"
)
@SerializedName
(
"goods_num"
)
...
@@ -127,12 +127,12 @@ data class OrderItem(
...
@@ -127,12 +127,12 @@ data class OrderItem(
@SerializedName
(
"create_time"
)
@SerializedName
(
"create_time"
)
val
createTime
:
String
,
val
createTime
:
String
,
@SerializedName
(
"desc_pic_url"
)
@SerializedName
(
"desc_pic_url"
)
val
descPicUrl
:
String
,
val
descPicUrl
:
List
<
String
>
,
@SerializedName
(
"expiration_time"
)
@SerializedName
(
"expiration_time"
)
val
expirationTime
:
String
,
val
expirationTime
:
String
,
@SerializedName
(
"goods_name"
)
@SerializedName
(
"goods_name"
)
// 商品名称
val
goodsName
:
String
,
val
goodsName
:
String
,
@SerializedName
(
"goods_num"
)
@SerializedName
(
"goods_num"
)
// 商品数量
val
goodsNum
:
Int
,
val
goodsNum
:
Int
,
@SerializedName
(
"goods_sale_type"
)
@SerializedName
(
"goods_sale_type"
)
val
goodsSaleType
:
Int
,
val
goodsSaleType
:
Int
,
...
@@ -147,7 +147,7 @@ data class OrderItem(
...
@@ -147,7 +147,7 @@ data class OrderItem(
@SerializedName
(
"goods_version"
)
@SerializedName
(
"goods_version"
)
val
goodsVersion
:
Int
,
val
goodsVersion
:
Int
,
@SerializedName
(
"introduce_pic_url"
)
@SerializedName
(
"introduce_pic_url"
)
val
introducePicUrl
:
String
,
val
introducePicUrl
:
List
<
String
>
,
@SerializedName
(
"is_used"
)
@SerializedName
(
"is_used"
)
val
isUsed
:
Int
,
val
isUsed
:
Int
,
@SerializedName
(
"marketing_id"
)
@SerializedName
(
"marketing_id"
)
...
@@ -160,7 +160,7 @@ data class OrderItem(
...
@@ -160,7 +160,7 @@ data class OrderItem(
val
orderItemId
:
String
,
val
orderItemId
:
String
,
@SerializedName
(
"payment"
)
@SerializedName
(
"payment"
)
val
payment
:
Int
,
val
payment
:
Int
,
@SerializedName
(
"price"
)
@SerializedName
(
"price"
)
// 商品价格
val
price
:
Double
,
val
price
:
Double
,
@SerializedName
(
"refund_amount"
)
@SerializedName
(
"refund_amount"
)
val
refundAmount
:
Int
,
val
refundAmount
:
Int
,
...
@@ -193,11 +193,11 @@ data class OrderShippingInfo(
...
@@ -193,11 +193,11 @@ data class OrderShippingInfo(
val
createTime
:
String
,
val
createTime
:
String
,
@SerializedName
(
"order_id"
)
@SerializedName
(
"order_id"
)
val
orderId
:
String
,
val
orderId
:
String
,
@SerializedName
(
"receiver_address"
)
@SerializedName
(
"receiver_address"
)
// 收货人地址
val
receiverAddress
:
String
,
val
receiverAddress
:
String
,
@SerializedName
(
"receiver_mobile"
)
@SerializedName
(
"receiver_mobile"
)
// 收货人手机号码
val
receiverMobile
:
String
,
val
receiverMobile
:
String
,
@SerializedName
(
"receiver_name"
)
@SerializedName
(
"receiver_name"
)
// 收货人名称
val
receiverName
:
String
,
val
receiverName
:
String
,
@SerializedName
(
"take_place_id"
)
@SerializedName
(
"take_place_id"
)
val
takePlaceId
:
Int
,
val
takePlaceId
:
Int
,
...
@@ -208,13 +208,13 @@ data class OrderShippingInfo(
...
@@ -208,13 +208,13 @@ data class OrderShippingInfo(
)
)
data class
PlaceList
(
data class
PlaceList
(
@SerializedName
(
"address"
)
@SerializedName
(
"address"
)
// 自提点地址
val
address
:
String
,
val
address
:
String
,
@SerializedName
(
"area"
)
@SerializedName
(
"area"
)
val
area
:
String
,
val
area
:
String
,
@SerializedName
(
"city"
)
@SerializedName
(
"city"
)
val
city
:
String
,
val
city
:
String
,
@SerializedName
(
"contact_name"
)
@SerializedName
(
"contact_name"
)
// 自提点联系人姓名
val
contactName
:
String
,
val
contactName
:
String
,
@SerializedName
(
"create_time"
)
@SerializedName
(
"create_time"
)
val
createTime
:
String
,
val
createTime
:
String
,
...
@@ -228,13 +228,13 @@ data class PlaceList(
...
@@ -228,13 +228,13 @@ data class PlaceList(
val
location
:
String
,
val
location
:
String
,
@SerializedName
(
"longitude"
)
@SerializedName
(
"longitude"
)
val
longitude
:
String
,
val
longitude
:
String
,
@SerializedName
(
"phone"
)
@SerializedName
(
"phone"
)
// 自提点联系人手机号码
val
phone
:
String
,
val
phone
:
String
,
@SerializedName
(
"province"
)
@SerializedName
(
"province"
)
val
province
:
String
,
val
province
:
String
,
@SerializedName
(
"take_place_id"
)
@SerializedName
(
"take_place_id"
)
val
takePlaceId
:
Int
,
val
takePlaceId
:
Int
,
@SerializedName
(
"take_place_name"
)
@SerializedName
(
"take_place_name"
)
// 自提点名称
val
takePlaceName
:
String
,
val
takePlaceName
:
String
,
@SerializedName
(
"update_time"
)
@SerializedName
(
"update_time"
)
val
updateTime
:
String
val
updateTime
:
String
...
...
Components/BOrder/src/main/java/com/yidian/shenghuoquan/border/viewmodel/OrderCommodityInfoViewModel.kt
View file @
af85c47f
package
com.yidian.shenghuoquan.border.viewmodel
package
com.yidian.shenghuoquan.border.viewmodel
import
android.content.Intent
import
android.net.Uri
import
androidx.lifecycle.LiveData
import
androidx.lifecycle.LiveData
import
androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.MutableLiveData
import
com.yidian.bcommon.app.YdBaseApplication
import
com.yidian.bcommon.mvvm.BaseViewModel
import
com.yidian.bcommon.mvvm.BaseViewModel
import
com.yidian.shenghuoquan.border.http.OrderRemoteDataSource
import
com.yidian.shenghuoquan.border.http.OrderRemoteDataSource
import
com.yidian.shenghuoquan.border.http.callback.IApplyRefundCallback
import
com.yidian.shenghuoquan.border.http.callback.IApplyRefundCallback
...
@@ -29,9 +32,14 @@ class OrderCommodityInfoViewModel : BaseViewModel() {
...
@@ -29,9 +32,14 @@ class OrderCommodityInfoViewModel : BaseViewModel() {
/**
/**
* 联系卖家
* 联系卖家
* 打开拨号界面
* @param phone 电话号码
*/
*/
fun
contractSeller
()
{
fun
contractSeller
(
phone
:
String
)
{
val
intent
=
Intent
(
Intent
.
ACTION_DIAL
)
intent
.
data
=
Uri
.
parse
(
"tel:$phone"
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
YdBaseApplication
.
context
.
startActivity
(
intent
)
}
}
/**
/**
...
...
Components/BOrder/src/main/res/layout/border_item_order_detail_commodity_list.xml
View file @
af85c47f
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
android:id=
"@+id/iv_commodity_pic"
android:id=
"@+id/iv_commodity_pic"
android:layout_width=
"@dimen/dp82"
android:layout_width=
"@dimen/dp82"
android:layout_height=
"@dimen/dp60"
android:layout_height=
"@dimen/dp60"
app:commodityImageUrl=
"@{data.descPicUrl}"
app:commodityImageUrl=
"@{data.descPicUrl
.get(0)
}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:src=
"@drawable/img_order_commodity_placeholder"
/>
tools:src=
"@drawable/img_order_commodity_placeholder"
/>
...
...
Components/BOrder/src/main/res/layout/border_view_order_commodity_info.xml
View file @
af85c47f
...
@@ -9,8 +9,6 @@
...
@@ -9,8 +9,6 @@
<import
type=
"com.yidian.shenghuoquan.border.manager.OrderStatus"
/>
<import
type=
"com.yidian.shenghuoquan.border.manager.OrderStatus"
/>
<import
type=
"java.util.List"
/>
<variable
<variable
name=
"vm"
name=
"vm"
type=
"com.yidian.shenghuoquan.border.viewmodel.OrderCommodityInfoViewModel"
/>
type=
"com.yidian.shenghuoquan.border.viewmodel.OrderCommodityInfoViewModel"
/>
...
@@ -84,7 +82,7 @@
...
@@ -84,7 +82,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp8"
android:layout_marginTop=
"@dimen/dp8"
android:background=
"@drawable/shape_stroke_e5e5e5_corner_14"
android:background=
"@drawable/shape_stroke_e5e5e5_corner_14"
android:onClick=
"@{() -> vm.contractSeller()}"
android:onClick=
"@{() -> vm.contractSeller(
data.placeList.phone
)}"
android:paddingStart=
"@dimen/dp13"
android:paddingStart=
"@dimen/dp13"
android:paddingTop=
"@dimen/dp9"
android:paddingTop=
"@dimen/dp9"
android:paddingEnd=
"@dimen/dp13"
android:paddingEnd=
"@dimen/dp13"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment