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
084d3990
Commit
084d3990
authored
Jun 11, 2024
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改状态查询
parent
0001c842
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
191 deletions
+103
-191
src/common/api/manage/index.js
+5
-0
src/views/saasManage/indexPage.vue
+98
-191
No files found.
src/common/api/manage/index.js
View file @
084d3990
...
...
@@ -37,3 +37,7 @@ export function deleteData(ids) {
params
:
{
ids
},
})
}
export
function
getStatusSelect
()
{
return
axios
.
get
(
'/sys/domain/getErpStatusList'
)
}
\ No newline at end of file
src/views/saasManage/indexPage.vue
View file @
084d3990
<
template
>
<div
class=
"saas-manage card"
>
<div
class=
"search"
>
<el-form
:model=
"searchForm"
size=
"small"
:inline=
"true"
>
<el-form
:model=
"searchForm"
size=
"small"
:inline=
"true"
>
<el-form-item
label=
""
>
<el-select
style=
"width: 80px"
v-model=
"searchForm.timeProp"
placeholder=
"请选择"
>
<el-option
label=
"创建时间"
value=
"createTime"
></el-option>
<el-option
label=
"过期时间"
value=
""
></el-option>
placeholder=
"请选择"
>
<el-option
label=
"创建时间"
value=
"createTime"
></el-option>
<el-option
label=
"过期时间"
value=
""
></el-option>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -30,68 +19,67 @@
value-format=
"yyyy-MM-dd HH:ss:mm"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"域名"
>
<el-input
size=
"small"
style=
"width: 160px"
v-model
.
trim=
"searchForm.domain"
placeholder=
"请输入域名"
></el-input>
placeholder=
"请输入域名"
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-input
v-model=
"searchForm.status"
<el-select
style=
"width: 160px"
size=
"small"
placeholder=
"请选择状态"
></el-input>
v-model=
"searchForm.status"
placeholder=
"请选择"
>
<el-option
v-for=
"(it, i) in statusList"
:key=
"i"
:label=
"it.value"
:value=
"it.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"公司名称"
>
<el-input
size=
"small"
style=
"width: 160px"
v-model=
"searchForm.companyName"
placeholder=
"请输入公司名称"
></el-input>
placeholder=
"请输入公司名称"
></el-input>
</el-form-item>
<el-form-item
label=
"负责人"
>
<el-input
size=
"small"
style=
"width: 160px"
v-model=
"searchForm.headName"
placeholder=
"请输入负责人"
></el-input>
placeholder=
"请输入负责人"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-search"
@
click=
"search"
>
查询
</el-button
>
@
click=
"search"
>
查询
</el-button
>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
size=
"small"
icon=
"el-icon-plus"
@
click=
"addData"
>
开通erp
</el-button
>
@
click=
"addData"
>
开通erp
</el-button
>
</el-form-item>
<el-form-item>
<el-button
type=
"danger"
size=
"small"
icon=
"el-icon-delete"
@
click=
"deleteData"
>
删除
</el-button
>
@
click=
"deleteData"
>
删除
</el-button
>
</el-form-item>
</el-form>
</div>
...
...
@@ -105,34 +93,26 @@
:highlight-current-row=
"true"
@
selection-change=
"handleSelectionChange"
@
row-click=
"rowClick"
header-row-class-name=
"header-row-class-name"
>
header-row-class-name=
"header-row-class-name"
>
<el-table-column
type=
"selection"
width=
"55"
header-align=
"center"
align=
"center"
>
</el-table-column>
align=
"center"
></el-table-column>
<el-table-column
label=
"序号"
type=
"index"
width=
"50"
align=
"center"
header-align=
"center"
>
</el-table-column>
header-align=
"center"
></el-table-column>
<el-table-column
label=
"域名"
prop=
"domain"
min-width=
"160"
header-align=
"center"
:show-overflow-tooltip=
"true"
>
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<a
:href=
"scope.row.domain"
>
{{
scope
.
row
.
domain
}}
</a>
<a
:href=
"scope.row.domain"
>
{{
scope
.
row
.
domain
}}
</a>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -141,85 +121,68 @@
header-align=
"center"
align=
"center"
width=
"180"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"负责人"
prop=
"headName"
header-align=
"center"
align=
"center"
width=
"80"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"联系电话"
prop=
"contactPhone"
header-align=
"center"
align=
"center"
width=
"120"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"套餐"
prop=
"packages"
header-align=
"center"
align=
"center"
width=
"120"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"资费"
prop=
"charges"
header-align=
"center"
align=
"center"
width=
"120"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"状态"
header-align=
"center"
align=
"center"
width=
"80"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.status"
disabled
active-color=
"#13ce66"
inactive-color=
"#ff4949"
></el-switch>
</
template
>
</el-table-column>
prop=
"statusTxt"
width=
"150"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
prop=
"createTime"
header-align=
"center"
align=
"center"
width=
"160"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"过期时间"
prop=
"expireTime"
header-align=
"center"
align=
"center"
width=
"160"
:show-overflow-tooltip=
"true"
></el-table-column>
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"操作"
header-align=
"center"
align=
"center"
width=
"55"
fixed=
"right"
>
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<i
class=
"el-icon-edit"
style=
"cursor: pointer"
@
click=
"handleEdit(scope.row)"
></i>
@
click=
"handleEdit(scope.row)"
></i>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -232,31 +195,24 @@
:page-size=
"pageSize"
:current-page=
"currentPage"
@
size-change=
"sizeChange"
@
current-change=
"onCurrentChange"
>
</el-pagination>
@
current-change=
"onCurrentChange"
></el-pagination>
</div>
<el-dialog
:title=
"editId ? '编辑' : '新增'"
:visible
.
sync=
"addVisible"
:close-on-click-modal=
"false"
width=
"700px"
>
width=
"700px"
>
<el-form
:model=
"editForm"
size=
"small"
ref=
"form"
:inline=
"true"
label-width=
"110px"
label-position=
"right"
>
label-position=
"right"
>
<el-form-item
label=
"域名"
prop=
"domain"
:rules=
"[
{ required: true, message: '请输入域名' },
]"
>
:rules=
"[{ required: true, message: '请输入域名' }]"
>
<el-input
style=
"width: 200px"
v-model
.
trim=
"editForm.domain"
...
...
@@ -264,76 +220,47 @@
:disabled=
"!!editId"
clearable
@
change=
"onChange"
placeholder=
"请输入域名"
>
<
template
slot=
"append"
>
{{
baseDomain
}}
</
template
>
placeholder=
"请输入域名"
>
<
template
slot=
"append"
>
{{
baseDomain
}}
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
:rules=
"[
{ required: true, message: '请选择状态' },
]"
>
<el-radio
v-model=
"editForm.status"
:label=
"true"
>
启用
</el-radio
>
<el-radio
v-model=
"editForm.status"
:label=
"false"
>
禁用
</el-radio
>
</el-form-item>
<el-form-item
label=
"公司名称"
prop=
"companyName"
:rules=
"[
{ required: true, message: '请输入公司名称' },
]"
>
:rules=
"[{ required: true, message: '请输入公司名称' }]"
>
<el-input
style=
"width: 200px"
v-model=
"editForm.companyName"
size=
"small"
placeholder=
"请输入公司名称"
/>
placeholder=
"请输入公司名称"
/>
</el-form-item>
<el-form-item
label=
"套餐"
prop=
"packages"
:rules=
"[
{ required: true, message: '请选择套餐' },
]"
>
:rules=
"[{ required: true, message: '请选择套餐' }]"
>
<el-select
style=
"width: 200px"
v-model=
"editForm.packages"
size=
"small"
@
change=
"changeCharges"
placeholder=
"请选择套餐"
>
placeholder=
"请选择套餐"
>
<el-option
v-for=
"item in paymentPackages"
:key=
"item.id"
:value=
"item.key"
:label=
"item.name"
></el-option>
:label=
"item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"负责人"
prop=
"headName"
:rules=
"[
{ required: true, message: '请输入负责人' },
]"
>
:rules=
"[{ required: true, message: '请输入负责人' }]"
>
<el-input
style=
"width: 200px"
v-model=
"editForm.headName"
size=
"small"
placeholder=
"负责人"
/>
placeholder=
"负责人"
/>
</el-form-item>
<el-form-item
label=
"联系电话"
...
...
@@ -343,56 +270,41 @@
{
pattern: /^1[3-9]\d{9}$/,
message: '请输入正确的电话号码格式',
trigger: 'blur',
},
]"
>
trigger: 'blur'
}
]"
>
<el-input
style=
"width: 200px"
v-model=
"editForm.contactPhone"
size=
"small"
placeholder=
"请输入联系电话"
/>
placeholder=
"请输入联系电话"
/>
</el-form-item>
<el-form-item
label=
"资费"
prop=
"charges"
:rules=
"[
{ required: true, message: '请输入资费' },
]"
>
:rules=
"[{ required: true, message: '请输入资费' }]"
>
<el-input
disabled
style=
"width: 200px"
v-model=
"editForm.charges"
size=
"small"
placeholder=
"请输入资费"
/>
placeholder=
"请输入资费"
/>
</el-form-item>
<el-form-item
label=
"过期时间"
prop=
"expireTime"
:rules=
"[
{ required: true, message: '请选择过期时间' },
]"
>
:rules=
"[{ required: true, message: '请选择过期时间' }]"
>
<el-date-picker
style=
"width: 200px"
v-model=
"editForm.expireTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期"
>
</el-date-picker>
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
</el-form>
<span
slot=
"footer"
>
<el-button
@
click=
"addVisible = false"
size=
"small"
>
取消
</el-button
>
<el-button
@
click=
"save"
type=
"primary"
size=
"small"
>
保存
</el-button
>
<el-button
@
click=
"addVisible = false"
size=
"small"
>
取消
</el-button>
<el-button
@
click=
"save"
type=
"primary"
size=
"small"
>
保存
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -400,10 +312,11 @@
<
script
>
import
{
getManageData
,
getStatusSelect
,
addManageData
,
updateManageData
,
getDataById
,
deleteData
,
deleteData
}
from
'@/common/api/manage/index'
export
default
{
name
:
'saasManage'
,
...
...
@@ -418,7 +331,7 @@ export default {
key
:
'INNERBATE'
,
o
:
0.2
,
oName
:
'0'
,
orders
:
10000
,
orders
:
10000
},
{
id
:
1
,
...
...
@@ -428,7 +341,7 @@ export default {
key
:
'PAYBASE'
,
o
:
0.2
,
oName
:
'0.2元/单'
,
orders
:
50000
,
orders
:
50000
},
{
id
:
2
,
...
...
@@ -438,7 +351,7 @@ export default {
key
:
'PAYADVANCED'
,
o
:
0.16
,
oName
:
'0.16元/单'
,
orders
:
187500
,
orders
:
187500
},
{
id
:
3
,
...
...
@@ -449,7 +362,7 @@ export default {
key
:
'PAYXVCVT'
,
month
:
1
,
oName
:
'9800元/月'
,
m
:
'按月收费'
,
m
:
'按月收费'
},
{
id
:
4
,
...
...
@@ -460,39 +373,40 @@ export default {
key
:
'PAYULTIMATE'
,
month
:
1
,
oName
:
'29800元/月'
,
m
:
'按月收费'
,
}
,
m
:
'按月收费'
}
],
period
:
[],
manageData
:
[],
searchForm
:
{},
editId
:
undefined
,
editForm
:
{
domain
:
''
,
status
:
true
,
domain
:
''
},
total
:
0
,
pageSize
:
50
,
currentPage
:
1
,
addVisible
:
false
,
selection
:
[],
statusList
:
[],
cloneEditForm
:
{},
loading
:
false
,
baseDomain
:
'.jomalls.com'
,
baseDomain
:
'.jomalls.com'
}
},
async
created
()
{
this
.
cloneEditForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
),
)
this
.
cloneEditForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
))
this
.
getList
()
this
.
getStatusList
()
},
methods
:
{
async
getStatusList
()
{
const
{
data
}
=
await
getStatusSelect
()
this
.
statusList
=
data
},
changeCharges
(
v
)
{
if
(
!
v
)
return
const
charges
=
this
.
paymentPackages
.
find
(
(
item
)
=>
item
.
key
===
v
,
)
const
charges
=
this
.
paymentPackages
.
find
((
item
)
=>
item
.
key
===
v
)
if
(
charges
)
{
this
.
$set
(
this
.
editForm
,
'charges'
,
charges
.
oName
)
}
...
...
@@ -508,10 +422,10 @@ export default {
{
...
this
.
searchForm
,
beginDate
:
this
.
period
&&
this
.
period
[
0
],
endDate
:
this
.
period
&&
this
.
period
[
1
]
,
endDate
:
this
.
period
&&
this
.
period
[
1
]
},
this
.
currentPage
,
this
.
pageSize
,
this
.
pageSize
)
this
.
manageData
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
...
...
@@ -527,9 +441,7 @@ export default {
addData
()
{
this
.
addVisible
=
true
this
.
editId
=
undefined
this
.
editForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
cloneEditForm
),
)
this
.
editForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
cloneEditForm
))
this
.
baseDomain
=
'.jomalls.com'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
clearValidate
()
...
...
@@ -538,13 +450,11 @@ export default {
async
handleEdit
(
row
)
{
this
.
editId
=
row
.
id
const
l
=
this
.
$loading
({
background
:
'rgba(0, 0, 0, 0.3)'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
try
{
const
res
=
await
getDataById
(
row
.
id
)
const
parts
=
/^
(
.*
)(\.(([^
.
]
+
)\.([^
.
]
+
)))
$/
.
exec
(
res
.
data
.
domain
,
)
const
parts
=
/^
(
.*
)(\.(([^
.
]
+
)\.([^
.
]
+
)))
$/
.
exec
(
res
.
data
.
domain
)
if
(
parts
)
{
const
name
=
parts
[
1
]
const
tld
=
'.'
+
parts
[
3
]
...
...
@@ -566,7 +476,7 @@ export default {
return
}
const
l
=
this
.
$loading
({
background
:
'rgba(0, 0, 0, 0.3)'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
let
databaseName
if
(
!
this
.
editId
)
{
...
...
@@ -578,7 +488,7 @@ export default {
const
res
=
await
updateManageData
({
...
this
.
editForm
,
domain
:
domain
,
databaseName
:
databaseName
,
databaseName
:
databaseName
})
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
res
.
message
)
...
...
@@ -589,7 +499,7 @@ export default {
const
res
=
await
addManageData
({
...
this
.
editForm
,
domain
:
domain
,
databaseName
:
databaseName
,
databaseName
:
databaseName
})
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
res
.
message
)
...
...
@@ -612,7 +522,7 @@ export default {
ids
=
this
.
selection
.
map
((
item
)
=>
item
.
id
)
ids
=
ids
.
join
()
const
l
=
this
.
$loading
({
background
:
'rgba(0, 0, 0, 0.3)'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
try
{
await
deleteData
(
ids
)
...
...
@@ -635,10 +545,7 @@ export default {
this
.
getList
()
},
rowClick
(
row
)
{
if
(
this
.
selection
.
length
===
1
&&
this
.
selection
[
0
]
===
row
)
{
if
(
this
.
selection
.
length
===
1
&&
this
.
selection
[
0
]
===
row
)
{
this
.
selection
=
[]
this
.
$refs
.
table
.
clearSelection
()
}
else
{
...
...
@@ -646,8 +553,8 @@ export default {
this
.
$refs
.
table
.
clearSelection
()
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
)
}
}
,
}
,
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
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