Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
3725331b
提交
3725331b
编写于
10月 16, 2020
作者:
ping zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加删除操作
上级
d60b402f
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
110 行增加
和
14 行删除
+110
-14
fetch.js
src/utils/fetch.js
+1
-1
index.js
src/utils/index.js
+18
-1
index.js
src/utils/shop/index.js
+12
-1
order-manage.vue
src/views/goods/order-manage.vue
+79
-11
未找到文件。
src/utils/fetch.js
浏览文件 @
3725331b
...
...
@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
}
if
(
process
.
env
.
BUILD_ENV
==
"development"
){
// 本地开发环境qgit
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config
.
headers
[
'token'
]
=
'
993044B5B767489286106A32032F076C
'
;
config
.
headers
[
'token'
]
=
'
C5172D7D7825463CA46752A894236AC2
'
;
// config.headers['token'] = localStorage.getItem('storageToken')
}
else
{
config
.
headers
[
'token'
]
=
localStorage
.
getItem
(
'storageToken'
)
...
...
src/utils/index.js
浏览文件 @
3725331b
...
...
@@ -273,7 +273,7 @@ export function convertTime(time, isToSlash = true) {
return
new
Date
(
time
.
getTime
()).
format
(
"yyyy-MM-dd hh:mm:ss"
);
}
else
{
return
time
.
replace
(
/
\/
/g
,
'-'
)
}
}
}
}
}
...
...
@@ -309,3 +309,20 @@ export function isEmptyUtils (obj) {
return
!
isNotEmptyUtils
(
obj
);
};
export
function
toDecimal2
(
x
)
{
if
(
isNaN
(
x
))
{
return
''
;
}
let
f
=
x
/
100
;
let
s
=
f
.
toString
();
let
rs
=
s
.
indexOf
(
'.'
);
if
(
rs
<
0
)
{
rs
=
s
.
length
;
s
+=
'.'
;
}
while
(
s
.
length
<=
rs
+
2
)
{
s
+=
'0'
;
}
return
s
;
}
src/utils/shop/index.js
浏览文件 @
3725331b
...
...
@@ -66,4 +66,15 @@ export const queryShopAuth = (params) => {
params
:
params
,
description
:
'查询超级管理员权限'
,
})
};
\ No newline at end of file
};
export
const
refundApply
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
'refund/apply'
),
method
:
'post'
,
data
:
params
,
description
:
'退货'
,
})
};
src/views/goods/order-manage.vue
浏览文件 @
3725331b
...
...
@@ -90,6 +90,7 @@
<el-button
v-if=
"scope.row.storeType == 1 && (scope.row.showStatus == 1 || scope.row.showStatus == 2)"
@
click=
"viewLogistics(scope.row)"
type=
"text"
size=
"small"
>
查看物流
</el-button>
<el-button
v-if=
"scope.row.storeType == 2 && scope.row.showStatus == 2"
@
click=
"distributeComplete(scope.row)"
type=
"text"
size=
"small"
>
配送完成
</el-button>
<el-button
@
click=
"goDetail(scope.row)"
type=
"text"
size=
"small"
>
查看详情
</el-button>
<el-button
v-if=
"(scope.row.storeType == 1 || scope.row.storeType == 2) && scope.row.showStatus == 3"
@
click=
"openTuiDialog(scope.row)"
type=
"text"
size=
"small"
>
退款退货
</el-button>
</div>
</
template
>
</el-table-column>
...
...
@@ -204,13 +205,42 @@
</span>
</el-dialog>
</div>
<el-dialog
class=
"tui-dialog"
title=
"退款退货"
:visible=
"showTuiDialog"
@
close=
"showTuiDialog = false"
width=
"385px"
>
<el-form
ref=
"tuiForm"
:model=
"tuiForm"
label-width=
"120px"
>
<el-form-item
label=
"退款退货方式:"
>
<el-select
v-model=
"tuiForm.type"
placeholder=
"请选择退货方式"
>
<el-option
v-for=
"item in tuiTypes"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
:disabled=
"item.disabled"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"退款金额"
prop=
"name"
>
<el-input
v-model=
"tuiForm.money"
:disabled=
"true"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"confirmTui"
>
完成
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
// import { openLoading, closeLoading } from "../../utils/utils";
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
SendSetDialog
from
"@/components/shop/send-set-dialog"
;
import
{
queryOrderList
,
updateExpress
}
from
"@/utils/shop"
;
import
{
queryOrderList
,
updateExpress
,
refundApply
}
from
"@/utils/shop"
;
import
{
toDecimal2
}
from
'@/utils'
;
export
default
{
components
:
{
SendSetDialog
,
...
...
@@ -232,16 +262,7 @@
pageSize
:
10
,
},
totalRows
:
0
,
tableData
:
[
// {
// id: '',
// name: '',
// type: null,
// status: '',
// num: null,
// createdTime: '',
// }
],
tableData
:
[],
closeTradeDialog
:
false
,
reasonTxt
:
''
,
changePriceDialog
:
false
,
...
...
@@ -264,6 +285,29 @@
{
required
:
true
,
message
:
'请输入快递单号'
,
trigger
:
"blur"
},
],
},
showTuiDialog
:
false
,
tuiForm
:
{
order
:
null
,
type
:
0
,
money
:
''
},
tuiTypes
:
[
{
label
:
'仅退款,无需退货'
,
value
:
0
,
disabled
:
false
},
{
label
:
'仅退货,无需退款'
,
value
:
1
,
disabled
:
true
},
{
label
:
'退款退货'
,
value
:
2
,
disabled
:
true
}
]
}
},
created
()
{
...
...
@@ -429,6 +473,22 @@
}
})
},
openTuiDialog
(
item
)
{
this
.
tuiForm
.
order
=
item
;
this
.
tuiForm
.
money
=
toDecimal2
(
item
.
amount
);
this
.
showTuiDialog
=
true
;
},
confirmTui
()
{
refundApply
({
orderId
:
this
.
tuiForm
.
order
.
id
}).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
$message
.
success
(
'操作成功'
);
this
.
showTuiDialog
=
false
;
this
.
searchList
();
}
else
{
this
.
$message
.
success
(
'操作失败,请重试'
);
}
});
},
},
filters
:
{
toFixed2
:
function
(
value
)
{
...
...
@@ -525,4 +585,12 @@
border-bottom
:
none
;
}
}
.tui-dialog
{
.el-dialog__header
{
text-align
:
center
;
}
.is-disabled
{
width
:
193px
;
}
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录