Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
01e5404e
提交
01e5404e
authored
4月 25, 2019
作者:
sin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加申请退货
上级
1c5f413c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
218 行增加
和
140 行删除
+218
-140
package.json
mobile-web/package.json
+3
-3
order.js
mobile-web/src/api/order.js
+23
-0
router.js
mobile-web/src/config/router.js
+1
-1
apply.vue
mobile-web/src/page/user/aftersale/apply.vue
+182
-128
info.vue
mobile-web/src/page/user/order/info.vue
+9
-8
没有找到文件。
mobile-web/package.json
浏览文件 @
01e5404e
...
@@ -11,16 +11,16 @@
...
@@ -11,16 +11,16 @@
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
"moment"
:
"^2.24.0"
,
"moment"
:
"^2.24.0"
,
"pingpp-js"
:
"^2.2.13"
,
"vant"
:
"^1.3.1"
,
"vant"
:
"^1.3.1"
,
"vue"
:
"^2.5.17"
,
"vue"
:
"^2.5.17"
,
"vue-router"
:
"^3.0.1"
,
"vue-router"
:
"^3.0.1"
,
"vuex"
:
"^3.1.0"
,
"vuex"
:
"^3.1.0"
"pingpp-js"
:
"^2.2.13"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^3.4.1"
,
"@vue/cli-plugin-babel"
:
"^3.4.1"
,
"@vue/cli-plugin-eslint"
:
"^3.4.1"
,
"@vue/cli-plugin-eslint"
:
"^3.4.1"
,
"@vue/cli-service"
:
"^3.
4.1
"
,
"@vue/cli-service"
:
"^3.
6.0
"
,
"babel-plugin-import"
:
"^1.8.0"
,
"babel-plugin-import"
:
"^1.8.0"
,
"less"
:
"^3.8.1"
,
"less"
:
"^3.8.1"
,
"less-loader"
:
"^4.1.0"
,
"less-loader"
:
"^4.1.0"
,
...
...
mobile-web/src/api/order.js
浏览文件 @
01e5404e
...
@@ -142,3 +142,26 @@ export function getLogisticsInfo(params) {
...
@@ -142,3 +142,26 @@ export function getLogisticsInfo(params) {
}
}
});
});
}
}
// 退货信息
export
function
getOrderReturnReason
()
{
return
request
({
url
:
'/order-api/users/order_return/reason'
,
method
:
'get'
,
});
}
export
function
orderReturnApply
(
params
)
{
return
request
({
headers
:
{
'Content-Type'
:
'application/json'
,
},
url
:
'/order-api/users/order_return/apply'
,
method
:
'POST'
,
data
:
{
...
params
,
},
});
}
mobile-web/src/config/router.js
浏览文件 @
01e5404e
...
@@ -133,7 +133,7 @@ const routes = [
...
@@ -133,7 +133,7 @@ const routes = [
}
}
},
},
{
{
path
:
'/user/aftersale/apply'
,
path
:
'/user/aftersale/apply
/:orderId
'
,
component
:
()
=>
import
(
'../page/user/aftersale/apply'
),
component
:
()
=>
import
(
'../page/user/aftersale/apply'
),
meta
:
{
meta
:
{
title
:
'申请售后'
title
:
'申请售后'
...
...
mobile-web/src/page/user/aftersale/apply.vue
浏览文件 @
01e5404e
</
<
template>
<
template
>
<div
style=
"font-size:12px;"
>
<div
style=
"font-size:12px;"
>
<headerNav
title=
"申请售后"
/>
<headerNav
title=
"申请售后"
/>
<van-radio-group
v-model=
"servicetype"
>
<van-radio-group
v-model=
"servicetype"
>
<van-cell-group>
<van-cell-group>
<van-cell
title=
"服务类型"
/>
<van-cell
title=
"服务类型"
/>
<van-cell
title=
"退款"
clickable
@
click=
"servicetype = '1'"
>
<van-cell
title=
"退款"
clickable
@
click=
"servicetype = '1'"
>
<van-radio
name=
"1"
/>
<van-radio
name=
"1"
/>
</van-cell>
</van-cell>
<van-cell
title=
"退货"
clickable
@
click=
"servicetype = '2'"
>
<van-cell
title=
"退货"
clickable
@
click=
"servicetype = '2'"
>
<van-radio
name=
"2"
/>
<van-radio
name=
"2"
/>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
</van-radio-group>
</van-radio-group>
<div
style=
"margin-top: 10px;"
>
<div
style=
"margin-top: 10px;"
>
<product-card
v-for=
"(product,i) in products"
:key=
"i"
:product=
'product'
iscard
></product-card>
<product-card
v-for=
"(product,i) in products"
:key=
"i"
:product=
'product'
</div>
iscard
></product-card>
<van-cell-group
style=
"margin-top: 10px;"
>
<van-cell
title=
"申请原因"
:label=
"remark"
is-link
@
click=
"onClickShowPicker"
/>
<van-field
label=
"退款金额"
placeholder=
"请输入金额"
v-model=
"amount"
:error-message=
"'可退金额:'+maxamount"
type=
'number'
/>
<van-field
label=
"问题描述"
type=
"textarea"
placeholder=
"请您在此描述问题"
rows=
"3"
autosize
/>
<van-cell
class=
"uploader"
style=
"font-size: 16px;"
>
<van-uploader
:after-read=
"onRead"
accept=
"image/gif, image/jpeg"
multiple
>
<van-icon
name=
"photograph"
/>
</van-uploader>
<div
v-for=
"(image,i) in images"
:key=
"image"
class=
"uploader-image"
>
<img
:src=
"image"
/>
<van-icon
name=
"close"
@
click=
"removeImage(i,image)"
/>
</div>
</van-cell>
</van-cell-group>
<van-cell-group
style=
"margin-top: 10px;"
>
<van-field
label=
"联系人"
/>
<van-field
label=
"联系电话"
/>
</van-cell-group>
<van-button
size=
"large"
type=
"primary"
style=
"margin-top: 10px;"
>
提交
</van-button>
<van-actionsheet
v-model=
"showPicker"
>
<van-picker
show-toolbar
title=
"申请原因"
:columns=
"columns"
@
cancel=
"onCancel"
@
confirm=
"onConfirm"
/>
</van-actionsheet>
</div>
</div>
<van-cell-group
style=
"margin-top: 10px;"
>
<van-cell
title=
"申请原因"
:label=
"remark"
is-link
@
click=
"onClickShowPicker"
/>
<van-field
label=
"退款金额"
placeholder=
"请输入金额"
v-model=
"amount"
:error-message=
"'可退金额:'+maxamount"
type=
'number'
/>
<van-field
label=
"问题描述"
type=
"textarea"
v-model=
"describe"
placeholder=
"请您在此描述问题"
rows=
"3"
autosize
/>
<!--
<van-cell
class=
"uploader"
style=
"font-size: 16px;"
>
-->
<!--
<van-uploader
:after-read=
"onRead"
accept=
"image/gif, image/jpeg"
multiple
>
-->
<!--
<van-icon
name=
"photograph"
/>
-->
<!--
</van-uploader>
-->
<!--
<div
v-for=
"(image,i) in images"
:key=
"image"
class=
"uploader-image"
>
-->
<!--
<img
:src=
"image"
/>
-->
<!--
<van-icon
name=
"close"
@
click=
"removeImage(i,image)"
/>
-->
<!--
</div>
-->
<!--
</van-cell>
-->
</van-cell-group>
<!--
<van-cell-group
style=
"margin-top: 10px;"
>
-->
<!--
<van-field
label=
"联系人"
/>
-->
<!--
<van-field
label=
"联系电话"
/>
-->
<!--
</van-cell-group>
-->
<van-button
@
click=
"handleSubmit"
size=
"large"
type=
"primary"
style=
"margin-top: 10px;"
>
提交
</van-button>
<!--
<van-actionsheet
v-model=
"showPicker"
>
-->
<!--
<van-picker
show-toolbar--
>
<!--title="申请原因" :columns="columns" @cancel="onCancel" @confirm="onConfirm"/>-->
<!--
</van-actionsheet>
-->
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
{
Toast
}
from
'vant'
;
data
(){
import
moment
from
'moment'
;
return
{
import
{
getOrderInfo
,
getOrderReturnReason
,
orderReturnApply
}
from
'../../../api/order'
;
servicetype
:
'1'
,
showPicker
:
false
,
export
default
{
remark
:
'我不想要了'
,
data
()
{
amount
:
'50.50'
,
return
{
maxamount
:
'50.50'
,
servicetype
:
'1'
,
images
:[],
showPicker
:
false
,
columns
:
[
'我不想要了'
,
'退运费'
,
'少件/漏发'
,
'未按约定时间发货'
,
'发错货'
,
'质量问题'
,
'商品与页面描述不符'
,
'商品损坏'
,
'缺少件'
],
remark
:
'不想要了'
,
products
:
[
describe
:
''
,
{
amount
:
'50.50'
,
id
:
1
,
maxamount
:
'50.50'
,
imageURL
:
images
:
[],
"https://img10.360buyimg.com/mobilecms/s88x88_jfs/t17572/12/840082281/351445/e1828c58/5aab8dbbNedb77d88.jpg"
,
columnsData
:
[],
title
:
"良品铺子 肉肉聚汇猪肉脯 猪蹄卤 辣味小吃520g"
,
columns
:
[
'我不想要了'
,
'退运费'
,
'少件/漏发'
,
'未按约定时间发货'
,
'发错货'
,
'质量问题'
,
'商品与页面描述不符'
,
'商品损坏'
,
'缺少件'
],
desc
:
"0.670kg/件,肉肉聚汇520g"
,
products
:
[
quantity
:
2
,
{
price
:
'50.5'
,
id
:
1
,
max
:
2
,
imageURL
:
min
:
0
,
"https://img10.360buyimg.com/mobilecms/s88x88_jfs/t17572/12/840082281/351445/e1828c58/5aab8dbbNedb77d88.jpg"
,
},
title
:
"良品铺子 肉肉聚汇猪肉脯 猪蹄卤 辣味小吃520g"
,
{
desc
:
"0.670kg/件,肉肉聚汇520g"
,
id
:
1
,
quantity
:
2
,
imageURL
:
price
:
'50.5'
,
"https://img10.360buyimg.com/mobilecms/s88x88_jfs/t22720/128/1410375403/319576/8dbd859f/5b5e69b3Nf4f0e9e7.jpg"
,
max
:
2
,
title
:
"元朗 鸡蛋卷 饼干糕点 中秋礼盒 广东特产680g"
,
min
:
0
,
desc
:
"1.320kg/件"
,
},
quantity
:
1
,
]
price
:
'225.5'
,
}
max
:
1
,
min
:
0
,
},
]
}
},
},
methods
:{
methods
:
{
onClickShowPicker
(){
onClickShowPicker
()
{
this
.
showPicker
=
true
;
this
.
showPicker
=
true
;
},
},
onCancel
()
{
onCancel
()
{
this
.
showPicker
=
false
;
this
.
showPicker
=
false
;
},
},
onConfirm
(
value
,
index
)
{
onConfirm
(
value
,
index
)
{
this
.
remark
=
value
;
this
.
remark
=
value
;
this
.
showPicker
=
false
;
this
.
showPicker
=
false
;
},
},
onRead
(
file
)
{
onRead
(
file
)
{
console
.
log
(
file
.
length
);
if
(
file
.
length
==
undefined
)
{
if
(
file
.
length
==
undefined
){
this
.
images
.
push
(
file
.
content
);
this
.
images
.
push
(
file
.
content
);
}
else
{
}
else
{
file
.
forEach
(
item
=>
{
file
.
forEach
(
item
=>
{
this
.
images
.
push
(
item
.
content
);
this
.
images
.
push
(
item
.
content
);
});
});
}
console
.
log
(
file
)
},
removeImage
(
index
,
image
){
this
.
images
.
splice
(
index
,
1
);
}
}
},
removeImage
(
index
,
image
)
{
this
.
images
.
splice
(
index
,
1
);
},
handleSubmit
()
{
const
{
orderId
}
=
this
.
$route
.
params
;
const
filterData
=
this
.
columnsData
.
filter
(
data
=>
{
if
(
data
.
displayName
==
this
.
remark
)
{
return
data
;
}
});
const
params
=
{
orderId
,
returnType
:
this
.
servicetype
,
reason
:
filterData
[
0
].
id
,
describe
:
this
.
describe
,
}
orderReturnApply
(
params
).
then
(
res
=>
{
Toast
(
'操作成功'
);
this
.
$router
.
go
(
-
1
);
})
},
},
mounted
()
{
const
{
orderId
}
=
this
.
$route
.
params
;
this
.
orderId
=
orderId
;
getOrderInfo
(
orderId
).
then
(
res
=>
{
const
{
buyPrice
,
discountPrice
,
orderItems
}
=
res
;
// 退还金额
const
maxAmount
=
buyPrice
-
discountPrice
/
100
this
.
amount
=
maxAmount
;
this
.
maxamount
=
maxAmount
;
this
.
products
=
orderItems
.
map
(
item
=>
{
return
{
...
item
,
picUrls
:
[
item
.
skuImage
],
}
});
});
// 获取订单 退款原因
getOrderReturnReason
().
then
(
res
=>
{
this
.
columnsData
=
res
;
this
.
columns
=
res
.
map
(
item
=>
{
return
item
.
displayName
;
})
// 默认选中
this
.
remark
=
this
.
columns
[
0
]
})
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.uploader
{
.uploader
{
font-size: 16px;
font-size: 16px;
.van-uploader{
float: left;
.van-uploader {
float: left;
}
}
&-image{
margin-left: 10px;position: relative;height: 50px;width: 50px;border: 1px solid #e5e7ea;float: left;margin-top: 5px;
&-image {
img{
margin-left: 10px;
width: 50px;
position: relative;
}
height: 50px;
i{
width: 50px;
position: absolute;
border: 1px solid #e5e7ea;
top: -6px;
float: left;
right: -6px;
margin-top: 5px;
font-size: 8px;
}
img {
width: 50px;
}
i {
position: absolute;
top: -6px;
right: -6px;
font-size: 8px;
}
}
}
}
}
</
style
>
</
style
>
mobile-web/src/page/user/order/info.vue
浏览文件 @
01e5404e
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</van-cell-group>
</van-cell-group>
<div
class=
"footer"
>
<div
class=
"footer"
>
<div
class=
"munu"
>
<div
class=
"munu"
>
<van-button
v-if=
"orderInfo.status === 3 "
size=
"small"
>
退货
</van-button>
<van-button
size=
"small"
>
申请售后
</van-button>
<van-button
v-if=
"orderInfo.status === 3 "
size=
"small"
v-on:click=
"clickConfirmReceiving(orderId)"
>
确认收货
</van-button>
<van-button
v-if=
"orderInfo.status === 3 "
size=
"small"
v-on:click=
"clickConfirmReceiving(orderId)"
>
确认收货
</van-button>
<van-button
v-if=
"orderInfo.status === 1 "
size=
"small"
type=
"danger"
@
click=
"goPay(orderInfo.id)"
>
支付
</van-button>
<van-button
v-if=
"orderInfo.status === 1 "
size=
"small"
type=
"danger"
@
click=
"goPay(orderInfo.id)"
>
支付
</van-button>
</div>
</div>
...
@@ -74,12 +74,6 @@
...
@@ -74,12 +74,6 @@
price
:
'499'
,
price
:
'499'
,
quantity
:
2
quantity
:
2
},
},
{
imageURL
:
'https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712'
,
title
:
'BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套'
,
price
:
'499'
,
quantity
:
2
},
]
]
}
}
},
},
...
@@ -97,7 +91,7 @@
...
@@ -97,7 +91,7 @@
const
{
id
}
=
this
.
$route
.
params
;
const
{
id
}
=
this
.
$route
.
params
;
this
.
orderId
=
id
;
this
.
orderId
=
id
;
getOrderInfo
(
id
).
then
(
res
=>
{
getOrderInfo
(
id
).
then
(
res
=>
{
const
{
status
,
recipient
,
latestLogisticsDetail
}
=
res
;
const
{
status
,
recipient
,
latestLogisticsDetail
,
orderItems
}
=
res
;
// 提交订单、配送中、交易成功
// 提交订单、配送中、交易成功
if
([
1
,
2
].
indexOf
(
status
)
!==
-
1
)
{
if
([
1
,
2
].
indexOf
(
status
)
!==
-
1
)
{
this
.
active
=
0
this
.
active
=
0
...
@@ -126,6 +120,13 @@
...
@@ -126,6 +120,13 @@
...
latestLogisticsDetail
,
...
latestLogisticsDetail
,
logisticsTimeText
:
logisticsTimeText
,
logisticsTimeText
:
logisticsTimeText
,
}
}
this
.
products
=
orderItems
.
map
(
item
=>
{
return
{
...
item
,
picUrls
:
[
item
.
skuImage
],
}
})
})
})
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论