Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
2bdc1623
Commit
2bdc1623
authored
May 16, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
45c3cca4
e7c3097c
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
905 additions
and
59 deletions
+905
-59
jsconfig.json
+3
-1
src/common/api/user/user.js
+3
-0
src/common/components/base/CustomForm.vue
+207
-0
src/components/wangeditor/index.vue
+22
-30
src/router/index.js
+8
-1
src/views/home/navMenu.vue
+39
-13
src/views/system/services.vue
+545
-0
src/views/user/rechargeRecord.vue
+73
-10
vue.config.js
+5
-4
No files found.
jsconfig.json
View file @
2bdc1623
...
...
@@ -14,6 +14,8 @@
"dom"
,
"dom.iterable"
,
"scripthost"
]
],
"noUnusedLocals"
:
false
,
"noUnusedParameters"
:
false
}
}
src/common/api/user/user.js
View file @
2bdc1623
...
...
@@ -3,3 +3,6 @@ import axios from '../axios'
export
function
getUserRechargeRecordListApi
(
params
)
{
return
axios
.
post
(
'/pay/businessPayRecord/list_page'
,
params
)
}
export
function
getSubjectListApi
(
params
)
{
return
axios
.
get
(
'/pay/businessPayRecord/subjectList'
,
params
)
}
src/common/components/base/CustomForm.vue
0 → 100644
View file @
2bdc1623
<
script
>
export
default
{
name
:
'CustomForm'
,
components
:
{},
props
:
{
formConfig
:
{
type
:
Array
,
default
:
()
=>
[]
},
isCustomButton
:
{
type
:
Boolean
,
default
:
true
},
isFlex
:
{
type
:
Boolean
,
default
:
true
},
formLabelWidth
:
{
type
:
String
,
default
:
'50px'
},
formItemWidth
:
{
type
:
String
,
default
:
null
},
value
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
computed
:
{},
watch
:
{
value
:
{
handler
(
newValue
,
oldValue
)
{
if
(
Object
.
keys
(
newValue
).
length
!==
0
)
{
this
.
formData
=
newValue
}
else
{
this
.
initFormData
()
}
},
immediate
:
true
,
deep
:
true
},
formData
:
{
handler
(
newValue
)
{
this
.
$emit
(
'input'
,
newValue
)
},
immediate
:
true
,
deep
:
true
}
},
data
()
{
return
{
loading
:
false
,
formData
:
{},
formColumns
:
[]
}
},
methods
:
{
search
()
{
this
.
$emit
(
'searchFn'
,
this
.
formData
)
},
addDialog
(
obj
)
{
this
.
$emit
(
'addDialog'
)
},
handleSubmit
(
event
)
{
event
.
preventDefault
()
},
showToggle
()
{
this
.
loading
=
!
this
.
loading
},
validateForm
()
{
return
this
.
$refs
.
form
.
validate
()
},
initFormData
()
{
this
.
formConfig
.
forEach
((
el
)
=>
{
switch
(
el
.
type
)
{
case
'input'
:
this
.
$set
(
this
.
formData
,
el
.
prop
,
''
)
break
case
'select'
:
case
'radio'
:
this
.
$set
(
this
.
formData
,
el
.
prop
,
el
.
defaultValue
||
''
)
break
default
:
// 如果有其他类型,可以在这里添加处理逻辑
this
.
$set
(
this
.
formData
,
el
.
prop
,
''
)
}
})
},
async
resetFields
()
{
await
this
.
$refs
.
form
?.
resetFields
()
}
},
created
()
{
// console.log(104, this.formData)
},
render
()
{
return
(
<
el
-
form
class
=
{
this
.
isFlex
?
'formClass'
:
''
}
ref
=
"form"
props
=
{{
model
:
this
.
formData
}}
size
=
"mini"
inline
onSubmit
=
{
this
.
handleSubmit
}
onKeyupenterCapture
=
{
this
.
search
}
>
{
this
.
formConfig
?.
map
((
item
,
index
)
=>
(
<
el
-
form
-
item
style
=
{{
width
:
item
.
type
===
'textarea'
?
'100%'
:
this
.
formItemWidth
}}
class
=
{
item
.
type
===
'textarea'
?
'textClass'
:
''
}
prop
=
{
item
.
prop
}
rules
=
{(
item
.
renderRules
&&
item
.
renderRules
(
this
.
formData
))
||
[]}
label
-
width
=
{
item
.
labelWidth
||
this
.
formLabelWidth
}
key
=
{
index
}
label
=
{
item
.
name
}
>
{
item
.
type
===
'input'
&&
(
<
el
-
input
v
-
model
=
{
this
.
formData
[
item
.
prop
]}
placeholder
=
{
item
.
placeholder
||
`请输入
${
item
.
name
}
`
}
clearable
><
/el-input
>
)}
{
item
.
type
===
'textarea'
&&
(
<
el
-
input
type
=
"textarea"
v
-
model
=
{
this
.
formData
[
item
.
prop
]}
placeholder
=
{
item
.
placeholder
||
`请输入
${
item
.
name
}
`
}
clearable
><
/el-input
>
)}
{
item
.
type
===
'select'
&&
(
<
el
-
select
v
-
model
=
{
this
.
formData
[
item
.
prop
]}
placeholder
=
{
item
.
placeholder
||
`请选择
${
item
.
name
}
`
}
clearable
>
{
item
.
options
?.
map
((
el
,
idx
)
=>
(
<
el
-
option
label
=
{
el
.
label
}
value
=
{
el
.
value
}
key
=
{
idx
}
><
/el-option
>
))}
<
/el-select
>
)}
{
item
.
type
===
'datePicker'
&&
(
<
el
-
date
-
picker
value
-
format
=
"yyyy-MM-dd"
type
=
{
item
.
dateType
||
'date'
}
placeholder
=
"选择日期"
v
-
model
=
{
this
.
formData
[
item
.
prop
]}
clearable
style
=
"width: 100%;"
><
/el-date-picker
>
)}
{
item
.
type
===
'radio'
&&
item
.
radioOptions
?.
map
((
el
,
idx
)
=>
(
<
el
-
radio
v
-
model
=
{
this
.
formData
[
item
.
prop
]}
label
=
{
el
.
value
}
key
=
{
idx
}
>
{
el
.
label
}
<
/el-radio
>
))}
<
/el-form-item
>
))}
{
this
.
isCustomButton
&&
(
<
el
-
form
-
item
>
<
el
-
button
type
=
"primary"
onClick
=
{
this
.
search
}
icon
=
"el-icon-search"
>
查询
<
/el-button
>
<
el
-
button
type
=
"success"
onClick
=
{
this
.
addDialog
}
>
新增
<
/el-button
>
<
/el-form-item
>
)}
{
!
this
.
isCustomButton
&&
<
slot
name
=
"btn"
><
/slot>
}
<
/el-form
>
)
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.formClass
{
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
.el-form-item
{
margin-right
:
0
;
display
:
flex
;
}
}
.textClass
{
display
:
flex
;
::v-deep.el-form-item
{
.el-form-item__content
{
width
:
100%
;
flex
:
1
;
}
}
}
</
style
>
src/components/wangeditor/index.vue
View file @
2bdc1623
...
...
@@ -5,15 +5,13 @@
style=
"border-bottom: 1px solid #ccc"
:editor=
"editor"
:defaultConfig=
"toolbarConfig"
:mode=
"mode"
/>
:mode=
"mode"
/>
<Editor
style=
"height: 300px; overflow-y: hidden"
v-model=
"html"
:defaultConfig=
"editorConfig"
:mode=
"mode"
@
onCreated=
"onCreated"
/>
@
onCreated=
"onCreated"
/>
</div>
</
template
>
<
script
>
...
...
@@ -27,32 +25,32 @@ export default {
data
()
{
return
{
editor
:
null
,
mode
:
'default'
,
mode
:
'default'
}
},
model
:
{
prop
:
'content'
,
event
:
'change'
,
event
:
'change'
},
props
:
{
content
:
{
type
:
String
,
default
:
''
,
default
:
''
},
placeholder
:
{
type
:
String
,
default
:
''
,
default
:
''
},
isInsert
:
{
type
:
Boolean
,
default
:
false
,
default
:
false
},
insertData
:
{
type
:
Array
,
default
:
()
=>
[
{
label
:
'客户名称'
,
value
:
'{payerName} {payerSurname}'
,
value
:
'{payerName} {payerSurname}'
},
{
label
:
'订单编号'
,
value
:
'{id}'
},
{
label
:
'店铺单号'
,
value
:
'{shopNumber}'
},
...
...
@@ -61,9 +59,9 @@ export default {
{
label
:
'发货时间'
,
value
:
'{shipmentTime}'
},
{
label
:
'妥投时间'
,
value
:
'{properTime}'
},
{
label
:
'商品'
,
value
:
'{products}'
},
{
label
:
'收货地址'
,
value
:
'{address}'
}
,
]
,
}
,
{
label
:
'收货地址'
,
value
:
'{address}'
}
]
}
},
computed
:
{
...
...
@@ -73,12 +71,12 @@ export default {
},
set
(
value
)
{
this
.
$emit
(
'change'
,
value
)
}
,
}
},
toolbarConfig
()
{
return
{
excludeKeys
:
[
'group-video'
],
insertKeys
:
insertKeys
(
this
.
isInsert
)
,
insertKeys
:
insertKeys
(
this
.
isInsert
)
}
},
editorConfig
()
{
...
...
@@ -87,34 +85,28 @@ export default {
placeholder
:
this
.
placeholder
||
'请输入内容...'
,
MENU_CONF
:
{
uploadImage
:
{
allowedFileTypes
:
[
'jpg'
,
'jpeg'
,
'png'
,
'gif'
,
'bmp'
,
],
allowedFileTypes
:
[
'jpg'
,
'jpeg'
,
'png'
,
'gif'
,
'bmp'
],
async
customUpload
(
files
,
insertFn
)
{
// JS 语法
// res 即服务端的返回结果
const
res
=
await
uploadImg
(
files
,
{
url
:
'upload/oss'
,
businessType
:
'other'
,
businessType
:
'other'
})
console
.
log
(
res
)
const
{
filePath
}
=
res
const
url
=
_this
.
setimgUrl
(
filePath
,
{
w
:
640
,
w
:
640
})
// 从 res 中找到 url alt href ,然后插入图片
insertFn
(
url
)
},
},
insertSelect
:
{
options
:
this
.
insertData
},
},
}
},
insertSelect
:
{
options
:
this
.
insertData
}
}
}
}
},
watch
:
{},
methods
:
{
...
...
@@ -122,7 +114,7 @@ export default {
this
.
editor
=
Object
.
seal
(
editor
)
// 一定要用 Object.seal() ,否则会报错
console
.
log
(
editor
.
getConfig
())
this
.
editor
.
getAllMenuKeys
()
}
,
}
},
mounted
()
{
// 模拟 ajax 请求,异步渲染编辑器
...
...
@@ -131,7 +123,7 @@ export default {
const
editor
=
this
.
editor
if
(
editor
==
null
)
return
editor
.
destroy
()
// 组件销毁时,及时销毁编辑器
}
,
}
}
</
script
>
<
style
scoped
>
...
...
src/router/index.js
View file @
2bdc1623
...
...
@@ -73,6 +73,12 @@ const routes = [
meta
:
{
title
:
'公告管理'
}
},
{
path
:
'/saas/services'
,
component
:
()
=>
import
(
'@/views/system/services.vue'
),
name
:
'system_services'
,
meta
:
{
title
:
'服务管理'
}
},
{
path
:
'/saas/countryCode'
,
component
:
()
=>
import
(
'@/views/system/countryCode.vue'
),
name
:
'system_countryCode'
,
...
...
@@ -149,7 +155,8 @@ const routes = [
component
:
()
=>
import
(
'@/views/production/AssistantManage.vue'
),
name
:
'production_assistant_manage'
,
meta
:
{
title
:
'应用版本管理'
}
},
{
},
{
path
:
'/saas/import-template'
,
component
:
()
=>
import
(
'@/views/import-template/index.vue'
),
name
:
'import-template'
,
...
...
src/views/home/navMenu.vue
View file @
2bdc1623
...
...
@@ -107,9 +107,19 @@
<div
class=
"sql-left"
>
<el-form
:model=
"editForm"
>
<el-form-item
required
label=
"数据源"
>
<el-select
@
change=
"selectChange"
style=
"width: 92%;"
v-model=
"editForm.database"
multiple
clearable
filterable
>
<el-select
@
change=
"selectChange"
style=
"width: 92%"
v-model=
"editForm.database"
multiple
clearable
filterable
>
<el-option
label=
"all"
value=
"all"
></el-option>
<el-option
:disabled=
"editForm.database.includes('all')"
v-for=
"it in dataBase"
:key=
"it"
:label=
"`${it.databaseName}(${it.dataHost})`"
<el-option
:disabled=
"editForm.database.includes('all')"
v-for=
"it in dataBase"
:key=
"it"
:label=
"`${it.databaseName}(${it.dataHost})`"
:value=
"it.id"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -127,20 +137,28 @@
type=
"password"
placeholder=
"请输入管理密码"
v-model=
"editForm.password"
></el-input>
<el-button
:loading=
"loading"
style=
"margin-left: 20px"
type=
"primary"
@
click=
"submitOm"
>
执行
<el-button
:loading=
"loading"
style=
"margin-left: 20px"
type=
"primary"
@
click=
"submitOm"
>
执行
</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div
class=
"sql-right"
>
<ul
v-if=
"msg_list.length
>
0"
>
<li
v-for=
"(item,i) in msg_list"
:key=
"i"
>
<ul
v-if=
"msg_list.length
>
0"
>
<li
v-for=
"(item,
i) in msg_list"
:key=
"i"
>
<div
class=
"flex"
>
<span>
执行结果:
</span>
<el-tag
size=
"mini"
v-if=
"item.status==='SUCCESS'"
type=
"success"
>
执行成功
</el-tag>
<el-tag
size=
"mini"
v-if=
"item.status === 'SUCCESS'"
type=
"success"
>
执行成功
</el-tag>
<el-tag
size=
"mini"
v-else
type=
"danger"
>
执行失败
</el-tag>
</div>
<div
class=
"flex"
>
...
...
@@ -249,6 +267,14 @@ export default {
icon
:
'el-icon-s-promotion'
,
index
:
'/saas/announceManage'
,
children
:
[]
},
{
id
:
5
,
path
:
''
,
label
:
'服务管理'
,
icon
:
'el-icon-s-order'
,
index
:
'/saas/services'
,
children
:
[]
}
]
},
...
...
@@ -430,7 +456,6 @@ export default {
...
mapState
([
'userInfo'
])
},
watch
:
{
currentTag
(
v
)
{
if
(
!
v
)
return
const
parent
=
this
.
menuList
.
find
((
e
)
=>
{
...
...
@@ -449,7 +474,10 @@ export default {
selectChange
(
v
)
{
if
(
v
.
includes
(
'all'
))
{
this
.
editForm
.
database
=
[
'all'
]
}
else
if
(
this
.
dataBase
.
length
>
0
&&
this
.
dataBase
.
length
===
v
.
length
)
{
}
else
if
(
this
.
dataBase
.
length
>
0
&&
this
.
dataBase
.
length
===
v
.
length
)
{
this
.
editForm
.
database
=
[
'all'
]
}
console
.
log
(
v
)
...
...
@@ -508,7 +536,7 @@ export default {
this
.
editForm
.
content
=
''
this
.
editForm
.
password
=
''
this
.
editForm
.
database
=
[
'all'
]
get
(
'platform/tools/datasource-list'
).
then
(
res
=>
{
get
(
'platform/tools/datasource-list'
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
dataBase
=
res
.
data
}
...
...
@@ -607,7 +635,6 @@ export default {
margin-right
:
10px
;
font-size
:
18px
;
}
</
style
>
<
style
lang=
"scss"
>
.sql-dialog
{
...
...
@@ -672,5 +699,4 @@ export default {
}
}
}
</
style
>
src/views/system/services.vue
0 → 100644
View file @
2bdc1623
<
template
>
<div
class=
"wraper"
>
<CustomForm
:formConfig=
"queryformConfig"
v-model=
"queryFormData"
@
addDialog=
"addDialog"
@
searchFn=
"search"
:isFlex=
"false"
></CustomForm>
<div
class=
"table_wrap"
v-loading=
"loading"
>
<table-vue
:sourceData=
"sourceData"
ref=
"multipleTable"
:tableColumns=
"usersTableColumns"
@
currentChange=
"currentTabFn"
@
selectionChange=
"selectionChange"
></table-vue>
</div>
<div
class=
"pagination"
>
<el-pagination
layout=
"sizes, total, prev, pager, next, jumper"
background
:total=
"paginationOptions.total"
:page-size=
"paginationOptions.pageSize"
:current-page=
"paginationOptions.currentPage"
@
size-change=
"sizeChange"
@
current-change=
"onCurrentChange"
></el-pagination>
</div>
<!-- 弹出层 -->
<el-dialog
:close-on-click-modal=
"false"
:title=
"is_title == 1 ? '新增' : '编辑'"
:visible
.
sync=
"dialogVisible"
@
closed=
"closedFn"
width=
"590px"
>
<CustomForm
formItemWidth=
"50%"
ref=
"formRefs"
v-model=
"formData"
:formConfig=
"editformConfig"
:isCustomButton=
"false"
formLabelWidth=
"100px"
></CustomForm>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
size=
"mini"
style=
"width: 100px"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"addServiceManagement"
size=
"mini"
style=
"width: 100px"
>
确认
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
axios
from
'../../common/api/axios'
import
CustomForm
from
'@/common/components/base/CustomForm.vue'
import
{
mapState
}
from
'vuex'
import
tableVue
from
'@/common/components/base/tableView.vue'
export
default
{
name
:
'system_users'
,
components
:
{
tableVue
,
CustomForm
},
data
()
{
return
{
is_title
:
1
,
ishowForm
:
false
,
select
:
''
,
sourceData
:
[],
serviceNameList
:
[],
formData
:
{},
queryFormData
:
{},
queryformConfig
:
[
{
prop
:
'name'
,
type
:
'select'
,
name
:
'名称'
,
options
:
[]
},
{
prop
:
'enable'
,
type
:
'select'
,
name
:
'状态'
,
options
:
[
{
label
:
'启用'
,
value
:
true
},
{
label
:
'停用'
,
value
:
false
}
]
}
],
editformConfig
:
[
{
prop
:
'name'
,
type
:
'select'
,
name
:
'名称'
,
options
:
[],
renderRules
:
(
item
)
=>
[
{
required
:
true
,
message
:
'请选择名称'
,
trigger
:
'change'
}
]
},
{
prop
:
'type'
,
type
:
'select'
,
name
:
'服务类型'
,
options
:
[
{
label
:
'基础'
,
value
:
'basics'
},
{
label
:
'增值'
,
value
:
'appreciation'
}
],
renderRules
:
(
item
)
=>
[
{
required
:
true
,
message
:
'请选择服务类型'
,
trigger
:
'change'
}
]
},
{
prop
:
'tollCollectionManner'
,
type
:
'select'
,
name
:
'收费方式'
,
options
:
[
{
label
:
'按单'
,
value
:
'order'
},
{
label
:
'按月'
,
value
:
'monthly'
},
{
label
:
'免费'
,
value
:
'免费'
}
],
renderRules
:
(
item
)
=>
[
{
required
:
true
,
message
:
'请选择收费方式'
,
trigger
:
'change'
}
]
},
{
prop
:
'rates'
,
type
:
'input'
,
name
:
'收费标准'
,
renderRules
:
(
item
)
=>
[
{
required
:
item
.
tollCollectionManner
!==
'免费'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
item
.
tollCollectionManner
!==
'免费'
)
{
if
(
value
===
''
||
value
===
null
||
value
===
undefined
)
{
return
callback
(
new
Error
(
'请输入收费标准'
))
}
}
const
numValue
=
Number
(
value
)
if
(
isNaN
(
numValue
))
{
return
callback
(
new
Error
(
'请输入有效数字'
))
}
if
(
numValue
<
0
)
{
return
callback
(
new
Error
(
'数值必须大于等于0'
))
}
// 校验通过
callback
()
},
trigger
:
'blur'
}
]
},
{
prop
:
'enable'
,
type
:
'radio'
,
name
:
'服务启用状态'
,
defaultValue
:
true
,
radioOptions
:
[
{
label
:
'启用'
,
value
:
true
},
{
label
:
'停用'
,
value
:
false
}
]
},
{
prop
:
'discount'
,
type
:
'radio'
,
name
:
'参与折扣'
,
defaultValue
:
true
,
radioOptions
:
[
{
label
:
'是'
,
value
:
true
},
{
label
:
'否'
,
value
:
false
}
]
},
{
prop
:
'remarks'
,
type
:
'textarea'
,
name
:
'备注'
}
],
dialogVisible
:
false
,
formId
:
null
,
paginationOptions
:
{
pageSize
:
100
,
currentPage
:
1
,
total
:
0
},
details
:
[],
loading
:
false
}
},
created
()
{
this
.
getServiceNameList
()
this
.
getList
()
},
computed
:
{
...
mapState
([
'reqMenu'
,
'employee'
]),
usersTableColumns
()
{
return
[
{
label
:
'服务名称'
,
key
:
'name'
,
width
:
''
,
render
:
(
item
)
=>
<
span
>
{
this
.
serviceNameList
.
get
(
item
.
name
)}
<
/span
>
},
{
label
:
'服务类型'
,
key
:
'type'
,
width
:
''
,
render
:
(
item
)
=>
(
<
span
>
{
item
.
type
===
'basics'
?
'基础'
:
'增值'
}
<
/span
>
)
},
{
label
:
'收费方式'
,
key
:
'tollCollectionManner'
,
width
:
''
,
render
:
(
item
)
=>
(
<
span
>
{
item
.
tollCollectionManner
===
'order'
?
'按单'
:
item
.
tollCollectionManner
===
'monthly'
?
'按月'
:
'免费'
}
<
/span
>
)
},
{
label
:
'收费标准'
,
key
:
'rates'
,
width
:
''
},
{
label
:
'状态'
,
key
:
'enable'
,
width
:
'100'
,
render
:
(
item
)
=>
(
<
span
>
{
item
.
enable
===
true
?
'启用'
:
'停用'
}
<
/span
>
)
},
{
label
:
'创建时间'
,
key
:
'createTime'
,
width
:
''
},
{
label
:
'更新时间'
,
key
:
'updateTime'
,
width
:
''
},
{
label
:
'是否参与折扣'
,
key
:
'discount'
,
width
:
'100'
,
render
:
(
item
)
=>
<
span
>
{
item
.
discount
===
true
?
'是'
:
'否'
}
<
/span
>
},
{
label
:
'备注'
,
key
:
'remarks'
,
width
:
'250'
},
{
label
:
'相关操作'
,
key
:
''
,
fixed
:
'right'
,
width
:
'130'
,
render
:
(
item
)
=>
(
<
div
>
<
span
title
=
"编辑"
class
=
"icon-view "
>
<
i
class
=
"el-icon-edit-outline"
style
=
"color:#E6A23C"
onClick
=
{(
e
)
=>
this
.
addDialog
(
item
.
id
,
e
)}
><
/i
>
<
/span
>
<
span
title
=
"删除"
class
=
"icon-view "
>
<
i
style
=
"color:#F56C6C"
class
=
"el-icon-delete"
onClick
=
{(
e
)
=>
this
.
deleteSection
(
item
,
e
)}
><
/i
>
<
/span
>
<
/div
>
)
}
]
},
funcRoleList
()
{
if
(
this
.
roleList
.
length
>
0
)
{
return
this
.
roleList
.
filter
((
item
)
=>
item
.
type
===
'FUNCTION_ROLE'
)
}
return
[]
},
dataRoleList
()
{
if
(
this
.
roleList
.
length
>
0
)
{
return
this
.
roleList
.
filter
((
item
)
=>
item
.
type
===
'DATA_ROLE'
)
}
return
[]
}
},
watch
:
{
formData
:
{
handler
(
newValue
)
{
// console.log(368, newValue)
},
immediate
:
true
,
deep
:
true
}
},
methods
:
{
sizeChange
(
value
)
{
this
.
paginationOptions
.
pageSize
=
value
this
.
getList
()
},
onCurrentChange
(
value
)
{
this
.
paginationOptions
.
currentPage
=
value
this
.
getList
()
},
selectionChange
(
selection
)
{
if
(
selection
.
length
>
0
)
{
this
.
select
=
selection
}
},
setempNo
(
id
)
{
for
(
const
iterator
of
this
.
employee
)
{
if
(
iterator
.
id
===
id
)
{
this
.
addcurrencyform
.
empNumber
=
iterator
.
empNumber
break
}
}
},
search
()
{
this
.
getList
()
},
currentTabFn
(
val
)
{
if
(
val
.
row
)
{
this
.
formId
=
val
.
row
.
id
}
},
// 修改新增
async
addDialog
(
id
,
e
)
{
e
&&
e
.
stopPropagation
()
this
.
ishowForm
=
true
try
{
if
(
id
)
{
this
.
is_title
=
2
const
url
=
'/serviceManagement/get'
const
res
=
await
axios
.
get
(
url
,
{
params
:
{
id
}
})
this
.
formData
=
{
...
res
.
data
}
}
else
{
this
.
is_title
=
1
}
this
.
dialogVisible
=
true
}
catch
(
error
)
{}
},
async
checkData
()
{
const
[
isValid
,
postData
]
=
await
Promise
.
all
([
new
Promise
((
resolve
)
=>
{
this
.
$refs
.
formRefs
.
validateForm
()
.
then
((
res
)
=>
resolve
(
true
))
.
catch
((
err
)
=>
{
resolve
(
false
)
console
.
log
(
err
)
})
}),
new
Promise
((
resolve
)
=>
{
const
params
=
{
name
:
''
,
id
:
''
,
type
:
''
,
tollCollectionManner
:
''
,
rates
:
''
,
enable
:
''
,
discount
:
''
,
remarks
:
''
}
for
(
const
key
in
params
)
{
params
[
key
]
=
this
.
formData
[
key
]
}
resolve
(
params
)
})
])
console
.
log
(
isValid
,
postData
)
return
{
isValid
,
postData
}
},
// 新增
async
addServiceManagement
()
{
const
isAdd
=
this
.
is_title
===
1
const
url
=
isAdd
?
'/serviceManagement/add'
:
'/serviceManagement/update'
try
{
const
{
isValid
,
postData
}
=
await
this
.
checkData
()
if
(
isValid
)
{
console
.
log
(
'add'
,
this
.
formData
)
const
finalData
=
isAdd
?
{
...
postData
,
id
:
undefined
}
:
postData
const
res
=
await
axios
.
post
(
url
,
finalData
)
if
(
res
.
code
!==
200
)
{
return
}
this
.
dialogVisible
=
false
this
.
getList
()
this
.
$message
.
success
(
isAdd
?
'新增成功'
:
'更新成功'
)
}
else
{
console
.
log
()
}
}
catch
(
error
)
{
console
.
log
(
error
)
}
},
// 查询
getList
()
{
this
.
loading
=
true
const
{
pageSize
,
currentPage
}
=
this
.
paginationOptions
axios
.
post
(
'serviceManagement/list_page'
,
{
pageSize
,
currentPage
,
...
this
.
queryFormData
})
.
then
((
res
)
=>
{
this
.
loading
=
false
if
(
res
.
code
===
200
)
{
this
.
sourceData
=
res
.
data
.
records
this
.
paginationOptions
.
total
=
res
.
data
.
total
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
})
}
})
},
// 删除
deleteSection
(
data
,
e
)
{
e
&&
e
.
stopPropagation
()
const
ids
=
[
data
.
id
].
join
()
this
.
$confirm
(
'确定删除选中的信息?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
axios
.
get
(
'serviceManagement/delete'
,
{
params
:
{
ids
}
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
this
.
getList
()
}
})
})
.
catch
(()
=>
{})
},
async
closedFn
()
{
this
.
dialogVisible
=
false
this
.
formData
=
{
enable
:
true
,
discount
:
true
}
await
this
.
$refs
.
formRefs
?.
resetFields
()
},
async
getServiceNameList
()
{
try
{
const
{
data
}
=
await
axios
.
get
(
'serviceManagement/serviceNameList'
)
const
newData
=
data
.
map
((
el
)
=>
{
return
{
label
:
el
.
value
,
value
:
el
.
key
}
})
this
.
serviceNameList
=
new
Map
(
newData
.
map
((
item
)
=>
[
item
.
value
,
item
.
label
])
)
console
.
log
(
509
,
this
.
serviceNameList
)
this
.
queryformConfig
[
0
].
options
=
[...
newData
]
this
.
editformConfig
[
0
].
options
=
[...
newData
]
}
catch
(
error
)
{
this
.
queryformConfig
[
0
].
options
=
[]
this
.
editformConfig
[
0
].
options
=
[]
console
.
log
(
error
)
}
}
}
}
</
script
>
<
style
scoped
>
.wraper
{
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
}
.table_wrap
{
flex
:
1
;
}
.circle
{
display
:
inline-block
;
height
:
10px
;
width
:
10px
;
border-radius
:
5px
;
margin-right
:
5px
;
}
.my-table
>>>
.first
{
background-color
:
red
!important
;
color
:
#fff
!important
;
}
</
style
>
src/views/user/rechargeRecord.vue
View file @
2bdc1623
...
...
@@ -9,10 +9,25 @@
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"套餐版本"
>
<el-
inpu
t
<el-
selec
t
v-model=
"searchForm.subject"
placeholder=
"请输入客户"
clearable
></el-input>
placeholder=
"请选择套餐版本"
clearable
>
<el-option
v-for=
"(item, index) in subjectList"
:key=
"index"
:label=
"item.value"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"支付状态"
>
<el-select
v-model=
"searchForm.payStatus"
placeholder=
"请选择支付状态"
clearable
>
<el-option
label=
"已支付"
value=
"已支付"
></el-option>
<el-option
label=
"待支付"
value=
"待支付"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"交易号"
>
<el-input
...
...
@@ -32,6 +47,17 @@
placeholder=
"请输入业务类型"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"付款时间"
>
<el-date-picker
:default-time=
"['00:00:00', '23:59:59']"
v-model=
"searchForm.daterange"
type=
"datetimerange"
value-format=
"yyyy-MM-dd HH:mm:ss"
range-separator=
"至"
:confirm=
"false"
start-placeholder=
"初始创建时间"
end-placeholder=
"结束创建时间"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
...
...
@@ -51,6 +77,7 @@
width=
"100%"
height=
"100%"
:highlight-current-row=
"true"
@
sort-change=
"sortChange"
header-row-class-name=
"header-row-class-name"
>
<el-table-column
label=
"序号"
...
...
@@ -104,6 +131,13 @@
width=
"100"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"支付状态"
prop=
"payStatus"
header-align=
"center"
align=
"center"
width=
"100"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"业务类型"
prop=
"businessType"
header-align=
"center"
...
...
@@ -149,6 +183,7 @@
<el-table-column
label=
"付款时间"
sortable=
"custom"
prop=
"clientTime"
header-align=
"center"
align=
"center"
...
...
@@ -183,13 +218,18 @@
</div>
</
template
>
<
script
>
import
{
getUserRechargeRecordListApi
}
from
'@/common/api/user/user'
import
{
getUserRechargeRecordListApi
,
getSubjectListApi
}
from
'@/common/api/user/user'
export
default
{
name
:
'rechargeRecord'
,
data
()
{
return
{
period
:
[],
subjectList
:
[],
sortParmas
:
{},
searchForm
:
{},
total
:
0
,
pageSize
:
50
,
...
...
@@ -200,14 +240,22 @@ export default {
},
async
created
()
{
this
.
loadData
()
this
.
getSubjectList
()
},
methods
:
{
async
loadData
()
{
cons
t
data
=
{
async
loadData
(
obj
)
{
le
t
data
=
{
...
this
.
searchForm
,
currentPage
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
}
if
(
this
.
searchForm
.
daterange
?.
length
)
{
data
.
minTime
=
this
.
searchForm
.
daterange
[
0
]
data
.
maxTime
=
this
.
searchForm
.
daterange
[
1
]
}
if
(
obj
)
{
data
=
{
...
data
,
...
obj
}
}
this
.
loading
=
true
try
{
const
res
=
await
getUserRechargeRecordListApi
(
data
)
...
...
@@ -215,22 +263,37 @@ export default {
this
.
rechargeRecordList
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
log
(
e
)
}
finally
{
this
.
loading
=
false
}
},
search
()
{
this
.
currentPage
=
1
this
.
loadData
()
this
.
loadData
(
this
.
sortParmas
)
},
onCurrentChange
(
currentPage
)
{
this
.
currentPage
=
currentPage
this
.
loadData
()
this
.
loadData
(
this
.
sortParmas
)
},
sizeChange
(
pageSize
)
{
this
.
pageSize
=
pageSize
this
.
loadData
()
this
.
loadData
(
this
.
sortParmas
)
},
sortChange
({
column
,
prop
,
order
})
{
this
.
sortParmas
=
{
field
:
prop
,
asc
:
order
===
'ascending'
}
this
.
loadData
(
this
.
sortParmas
)
},
async
getSubjectList
()
{
try
{
const
{
data
}
=
await
getSubjectListApi
()
this
.
subjectList
=
data
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
}
}
...
...
vue.config.js
View file @
2bdc1623
...
...
@@ -7,11 +7,12 @@ module.exports = defineConfig({
proxy
:
{
'/api'
:
{
target
:
'http://10.168.31.222:8096'
,
changeOrigin
:
true
,
changeOrigin
:
true
// pathRewrite: {
// '^/api': '',
// },
}
,
}
,
}
,
}
}
}
})
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