Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jwhx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
jwhx
Commits
5f30bc68
Commit
5f30bc68
authored
Nov 19, 2024
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~~
parent
559bff9a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
236 additions
and
2 deletions
+236
-2
resources/admin/public/config.js
resources/admin/public/config.js
+1
-1
resources/admin/src/config/index.js
resources/admin/src/config/index.js
+1
-1
resources/admin/src/pages/order/exchange/index.vue
resources/admin/src/pages/order/exchange/index.vue
+130
-0
resources/admin/src/pages/order/exchange/save.vue
resources/admin/src/pages/order/exchange/save.vue
+97
-0
resources/admin/src/router/index.js
resources/admin/src/router/index.js
+7
-0
No files found.
resources/admin/public/config.js
View file @
5f30bc68
...
...
@@ -7,5 +7,5 @@ const APP_CONFIG = {
APP_NAME
:
"
后台管理系统
"
,
//接口地址,如遇跨域需使用nginx代理
API_URL
:
"
http
://os.dxpd
.cn/admin/
"
API_URL
:
"
http
s://juwu.xicheda
.cn/admin/
"
}
resources/admin/src/config/index.js
View file @
5f30bc68
...
...
@@ -12,7 +12,7 @@ const DEFAULT_CONFIG = {
CORE_VER
:
"
1.6.6
"
,
//接口地址
API_URL
:
'
http
://api.phpec
.cn/admin/
'
,
API_URL
:
'
http
s://juwu.xicheda
.cn/admin/
'
,
//请求超时
TIMEOUT
:
50000
,
...
...
resources/admin/src/pages/order/exchange/index.vue
0 → 100644
View file @
5f30bc68
<
template
>
<el-container>
<el-header>
<div
class=
"left-panel"
>
<el-input
v-model=
"search.keyword"
placeholder=
"关键词"
style=
"width:150px; margin-right: 10px;"
clearable
></el-input>
<el-button-group
style=
"margin-left: 10px;"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"upsearch"
>
搜索
</el-button>
</el-button-group>
</div>
<div
class=
"right-panel"
>
<el-button-group>
<el-button
type=
"danger"
icon=
"el-icon-plus"
@
click=
"add"
>
添加
</el-button>
</el-button-group>
</div>
</el-header>
<el-main
class=
"nopadding"
>
<scTable
tableName=
"member"
ref=
"table"
:apiObj=
"list.apiObj"
:column=
"list.column"
row-key=
"id"
@
selection-change=
"selectionChange"
border
stripe
>
<el-table-column
type=
"selection"
width=
"50"
></el-table-column>
<template
#order_no
="
scope
"
>
{{
scope
.
row
.
order
?.
order_no
}}
</
template
>
<
template
#member
="
scope
"
>
{{
scope
.
row
.
member
?.
nickname
}}
(
{{
scope
.
row
.
member
?.
username
}}
)
</
template
>
<
template
#status
="
scope
"
>
<el-tag
:type=
"status[scope.row.status]?.type"
>
{{
status
[
scope
.
row
.
status
]?.
label
??
'
未知
'
}}
</el-tag>
</
template
>
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
width=
"140"
>
<
template
#default
="
scope
"
>
<el-button-group>
<el-button
type=
"primary"
@
click=
"table_audit(scope.row, scope.$index)"
v-if=
"scope.row.status == 0"
>
审核
</el-button>
</el-button-group>
</
template
>
</el-table-column>
</scTable>
</el-main>
<save
v-if=
"dialog.save"
ref=
"saveBox"
@
success=
"upsearch"
@
closed=
"dialog.save=false"
/>
</el-container>
</template>
<
script
>
import
save
from
'
./save.vue
'
export
default
{
name
:
'
order.exchange
'
,
components
:{
save
,
},
data
(){
return
{
dialog
:
{
search
:
false
,
import
:
false
,
print
:
false
},
status
:
{
0
:
{
label
:
'
待审核
'
,
type
:
'
primary
'
},
1
:
{
label
:
'
已通过
'
,
type
:
'
success
'
},
2
:
{
label
:
'
已拒绝
'
,
type
:
'
danger
'
},
3
:
{
label
:
'
已完成
'
,
type
:
'
warning
'
}},
list
:
{
apiObj
:
this
.
$API
.
order
.
refund
.
list
,
column
:
[
{
prop
:
'
id
'
,
label
:
'
ID
'
,
width
:
80
},
{
prop
:
'
order_id
'
,
label
:
'
订单ID
'
,
width
:
120
},
{
prop
:
'
order_no
'
,
label
:
'
订单号
'
,
width
:
240
},
{
prop
:
'
member
'
,
label
:
'
申请人
'
},
{
prop
:
'
amount
'
,
label
:
'
退款金额
'
,
width
:
120
},
{
prop
:
'
reason
'
,
label
:
'
退款原因
'
,
width
:
120
},
{
prop
:
'
status
'
,
label
:
'
退款状态
'
,
width
:
120
},
{
prop
:
'
created_at
'
,
label
:
'
添加时间
'
,
width
:
140
},
{
prop
:
'
updated_at
'
,
label
:
'
更新时间
'
,
width
:
140
},
],
},
selection
:
[],
search
:
{},
}
},
methods
:{
upsearch
(){
this
.
$refs
.
table
.
reload
(
this
.
search
);
},
moreUpsearch
(
search
){
this
.
search
=
search
;
this
.
upsearch
();
},
moreSearch
(){
this
.
dialog
.
search
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
searchBox
.
open
().
setData
(
this
.
search
)
})
},
//表格选择后回调事件
selectionChange
(
selection
){
this
.
selection
=
selection
;
},
batch_del
(){
},
table_show
(
row
){
this
.
dialog
.
detail
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
detailBox
.
open
().
setData
(
row
)
})
},
add
(){
this
.
dialog
.
save
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
saveBox
.
open
()
})
},
table_edit
(
row
){
this
.
dialog
.
save
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
saveBox
.
open
(
'
edit
'
).
setData
(
row
)
})
},
table_audit
(
row
){
this
.
dialog
.
save
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
saveBox
.
open
(
'
audit
'
).
setData
(
row
)
})
},
async
table_del
(
row
){
var
reqData
=
{
id
:
row
.
id
}
var
res
=
await
this
.
$API
.
order
.
refund
.
delete
.
post
(
reqData
);
if
(
res
.
code
==
1
){
//这里选择刷新整个表格 OR 插入/编辑现有表格数据
this
.
upsearch
()
this
.
$message
.
success
(
"
删除成功
"
)
}
else
{
this
.
$alert
(
res
.
message
,
"
提示
"
,
{
type
:
'
error
'
})
}
}
}
}
</
script
>
\ No newline at end of file
resources/admin/src/pages/order/exchange/save.vue
0 → 100644
View file @
5f30bc68
<
template
>
<el-drawer
:title=
"titleMap[mode]"
v-model=
"visible"
:size=
"1000"
destroy-on-close
:close-on-click-modal=
"false"
@
closed=
"$emit('closed')"
>
<el-main>
<el-form
ref=
"dialogForm"
:model=
"form"
:rules=
"rules"
label-width=
"160px"
>
<el-form-item
label=
"退款金额"
prop=
"amount"
>
<el-input
v-model=
"form.amount"
placeholder=
"请输入退款金额"
disabled
/>
</el-form-item>
<el-form-item
label=
"退款原因"
prop=
"reason"
>
<el-input
type=
"textarea"
v-model=
"form.reason"
disabled
/>
</el-form-item>
<el-form-item
label=
"退款凭证"
prop=
"images"
v-if=
"false"
>
<sc-upload
v-model=
"form.images"
title=
"退款凭证"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
type=
"textarea"
v-model=
"form.remark"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
style=
"width: 160px;"
>
<el-option
v-for=
"item in [
{label: '退款中', value: 0}, {label: '同意退款', value: 1}, {label: '拒绝退款', value: 2}]" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-form>
</el-main>
<template
#footer
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确认提交
</el-button>
</
template
>
</el-drawer>
</template>
<
script
>
import
scEditor
from
'
@/components/scEditor
'
export
default
{
emits
:
[
'
success
'
,
'
closed
'
],
data
()
{
return
{
mode
:
"
add
"
,
titleMap
:
{
add
:
'
新增
'
,
edit
:
'
编辑
'
,
audit
:
'
审核
'
},
form
:
{
type_id
:
0
,
operate
:
[]},
rules
:
{
title
:
[{
required
:
true
,
message
:
'
请输入商品名称
'
}]
},
visible
:
false
,
isSaveing
:
false
,
cache
:
{}
}
},
components
:
{
scEditor
},
watch
:
{
"
form.operate
"
(
value
){
this
.
priceTab
=
value
[
0
]
}
},
mounted
()
{
},
methods
:
{
//显示
open
(
mode
=
'
add
'
){
this
.
mode
=
mode
;
this
.
visible
=
true
;
return
this
;
},
//表单提交方法
onSubmit
(){
this
.
$refs
.
dialogForm
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
this
.
isSaveing
=
true
;
let
res
if
(
this
.
mode
==
'
edit
'
){
res
=
await
this
.
$API
.
order
.
refund
.
edit
.
post
(
this
.
form
);
}
else
if
(
this
.
mode
==
'
add
'
){
res
=
await
this
.
$API
.
order
.
refund
.
add
.
post
(
this
.
form
);
}
else
if
(
this
.
mode
==
'
audit
'
)
{
res
=
await
this
.
$API
.
order
.
refund
.
audit
.
post
(
this
.
form
);
}
this
.
isSaveing
=
false
;
if
(
res
.
code
==
1
){
this
.
$emit
(
'
success
'
,
res
.
data
)
this
.
visible
=
false
;
this
.
$message
.
success
(
"
操作成功
"
)
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
}
})
},
//表单注入数据
setData
(
data
){
this
.
loading
=
true
Object
.
assign
(
this
.
form
,
data
)
}
}
}
</
script
>
resources/admin/src/router/index.js
View file @
5f30bc68
...
...
@@ -129,6 +129,8 @@ function filterAsyncRouter(routerMap) {
item
.
meta
.
url
=
item
.
path
;
item
.
path
=
`/i/
${
item
.
name
}
`
;
}
//MAP转路由对象
var
route
=
{
path
:
item
.
path
,
...
...
@@ -138,6 +140,11 @@ function filterAsyncRouter(routerMap) {
children
:
item
.
children
?
filterAsyncRouter
(
item
.
children
)
:
null
,
component
:
loadComponent
(
item
.
component
)
}
if
(
item
.
component
==
'
/order/exchange
'
){
// console.info(item,"item.");
// console.info('route',route);
}
accessedRouters
.
push
(
route
)
})
return
accessedRouters
...
...
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