Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 11e2405a
authored
Mar 09, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口联调50%
1 parent
c2d8ed41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
49 deletions
src/api/modules/serviceConfig.js
src/views/serviceConfig/addClause.vue
src/views/serviceConfig/index.vue
src/api/modules/serviceConfig.js
View file @
11e2405
...
...
@@ -10,6 +10,51 @@ const get4SList = params => {
})
}
// 获取权益列表
const
getEquityList
=
params
=>
{
params
.
method
=
'scrm.api.equity.serviceterms.page'
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
exportEquityApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.serviceterms.export`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getServiceList
=
params
=>
{
params
.
method
=
`scrm.api.equity.serviceterms.itemslist`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
craeteEquity
=
params
=>
{
params
.
method
=
`scrm.api.equity.serviceterms.insertorupdate`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
get4SList
get4SList
,
getEquityList
,
exportEquityApi
,
getServiceList
,
craeteEquity
}
\ No newline at end of file
src/views/serviceConfig/addClause.vue
View file @
11e2405
...
...
@@ -7,11 +7,11 @@
<div
v-if=
"formObj.merchantName"
>
{{
formObj
.
merchantName
}}
</div>
</div>
<div
class=
"equity-class"
slot=
"selectEquity"
>
<div
class=
"equity-area"
>
<el-checkbox
v-model=
"
checked1"
>
备选项1
</el-checkbox>
<div>
<el-input
class=
"desc"
v-model=
"
txt
"
placeholder=
"请输入概述"
></el-input>
<quill-editor
class=
"quill"
v-model=
"
tx
t"
:options=
"editorOption"
></quill-editor>
<div
class=
"equity-area"
v-for=
"item in serviceList"
:key=
"item.serviceCode"
>
<el-checkbox
v-model=
"
item.checked"
>
{{
item
.
serviceName
}}
</el-checkbox>
<div
v-if=
"item.checked"
>
<el-input
class=
"desc"
v-model=
"
item.summary
"
placeholder=
"请输入概述"
></el-input>
<quill-editor
class=
"quill"
v-model=
"
item.serviceConten
t"
:options=
"editorOption"
></quill-editor>
</div>
</div>
</div>
...
...
@@ -50,6 +50,7 @@ import 'quill/dist/quill.snow.css'
return
{
size
:
'small'
,
txt
:
''
,
serviceList
:
[],
relateStoreVisible
:
false
,
selectedList
:
[],
editorOption
:
{
...
...
@@ -80,23 +81,45 @@ import 'quill/dist/quill.snow.css'
]
}
},
created
()
{
this
.
getServiceList
()
},
mounted
()
{
},
methods
:
{
getServiceList
(){
this
.
$apis
.
serviceConfig
.
getServiceList
({}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
?.
length
){
this
.
serviceList
=
res
.
map
(
item
=>
{
item
.
checked
=
false
item
.
serviceContent
=
''
item
.
summary
=
''
return
item
})
}
})
},
selectMerchant
(){
this
.
relateStoreVisible
=
!
this
.
relateStoreVisible
},
handleRelateStoreConfirm
(
e
){
console
.
log
(
e
)
this
.
formObj
=
e
handleRelateStoreConfirm
(
e
=
{}){
this
.
formObj
=
{...
e
}
this
.
selectMerchant
()
},
submit
(){
let
a
=
this
.
$refs
.
editArea
console
.
log
(
a
.
innerHTML
)
let
{
merchantId
,
merchantName
}
=
this
.
formObj
let
serviceList
=
{...
this
.
serviceList
}
let
params
=
{
merchantId
,
merchantName
,
serviceList
:
serviceList
.
map
(
item
=>
item
.
checked
)
}
this
.
$apis
.
serviceConfig
.
craeteEquity
(
params
).
then
(
res
=>
{
console
.
log
()
})
}
}
}
...
...
src/views/serviceConfig/index.vue
View file @
11e2405
...
...
@@ -57,11 +57,11 @@
}
],
searchForm
:
{
completionStatus
:
''
,
packageCod
e
:
''
,
channel
:
''
,
successDate
:
[]
,
effectiveDate
:
[]
merchantName
:
''
,
serviceNam
e
:
''
,
serviceContent
:
''
,
createdDate
:
''
,
updatedDate
:
''
},
tableSearchForm
:
{},
searchFormData
:
[
...
...
@@ -101,53 +101,48 @@
}
],
// 表格
getListApi
:
this
.
$apis
.
beforeSale
.
getOrdersummary
,
getListApi
:
this
.
$apis
.
serviceConfig
.
getEquityList
,
tableParams
:
{
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
'服务名称'
,
prop
:
'serveiceName'
,
line
:
1
,
prop
:
'serviceName'
,
width
:
200
},
{
label
:
'条款描述'
,
prop
:
'
description
'
,
prop
:
'
serviceContent
'
,
},
{
label
:
'使用说明'
,
line
:
1
,
prop
:
'useRemark'
prop
:
'summary'
},
{
label
:
'创建时间'
,
line
:
1
,
prop
:
'createdDate'
,
width
:
160
,
prop
:
'createDate'
,
width
:
200
,
formatter
:
cellValue
=>
{
return
cellValue
.
effectiveDate
?
dayjs
(
cellValue
.
effectiveDate
).
format
(
'YYYY-MM-DD
'
)
:
'--'
return
cellValue
.
createDate
?
dayjs
(
cellValue
.
createDate
).
format
(
'YYYY-MM-DD HH:mm:ss
'
)
:
'--'
}
},
{
label
:
'更新时间'
,
line
:
1
,
prop
:
'updatedDate'
,
width
:
160
,
prop
:
'updateDate'
,
width
:
200
,
formatter
:
cellValue
=>
{
return
cellValue
.
effectiveDate
?
dayjs
(
cellValue
.
effectiveDate
).
format
(
'YYYY-MM-DD
'
)
:
'--'
return
cellValue
.
updateDate
?
dayjs
(
cellValue
.
updateDate
).
format
(
'YYYY-MM-DD HH:mm:ss
'
)
:
'--'
}
},
{
label
:
'操作人'
,
line
:
1
,
prop
:
'updatedBy'
,
prop
:
'updateBy'
,
width
:
140
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'page
Count
'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'page
Num
'
,
totalCount
:
'total'
},
}
},
...
...
@@ -156,16 +151,19 @@
methods
:
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
.
successDate
.
length
)
{
params
.
successStartDates
=
new
Date
(
this
.
searchForm
.
successDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
successEndDates
=
new
Date
(
this
.
searchForm
.
successDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
console
.
log
(
params
,
'params'
)
if
(
this
.
searchForm
?.
createdDate
?.
length
)
{
params
.
minCreateTime
=
new
Date
(
this
.
searchForm
.
createdDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
maxCreateTime
=
new
Date
(
this
.
searchForm
.
createdDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
if
(
this
.
searchForm
.
effectiveDate
.
length
)
{
params
.
effectiveStartDates
=
new
Date
(
this
.
searchForm
.
effective
Date
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
effectiveEndDates
=
new
Date
(
this
.
searchForm
.
effective
Date
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
if
(
this
.
searchForm
?.
updatedDate
?
.
length
)
{
params
.
minUpdateTime
=
new
Date
(
this
.
searchForm
.
updated
Date
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
maxUpdateTime
=
new
Date
(
this
.
searchForm
.
updated
Date
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
return
params
delete
params
.
createdDate
delete
params
.
updatedDate
return
{...
params
}
},
beforeSearchFn
()
{
...
...
@@ -178,7 +176,7 @@
// 导出
handleExport
()
{
var
params
=
this
.
getParams
()
this
.
$apis
.
beforeSale
.
getSummaryExport
Api
(
params
).
then
(
res
=>
{
this
.
$apis
.
serviceConfig
.
exportEquity
Api
(
params
).
then
(
res
=>
{
// window.open(res)
let
tempaa
=
utils
.
getExplorer
()
if
(
tempaa
==
'QQ'
)
{
...
...
@@ -198,11 +196,11 @@
handleReset
()
{
this
.
searchForm
=
{
completionStatus
:
''
,
packageCod
e
:
''
,
channel
:
''
,
successDate
:
[]
,
effectiveDate
:
[]
merchantName
:
''
,
serviceNam
e
:
''
,
serviceContent
:
''
,
createdDate
:
''
,
updatedDate
:
''
}
this
.
handleSearch
()
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment