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 dc154ed5
authored
May 17, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口联调
1 parent
5d96362a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
67 deletions
src/api/modules/serviceConfig.js
src/components/Editor/index.vue
src/components/Upload/index.vue
src/config/index.js
src/views/ContractManager/addTmpl.vue
src/views/serviceConfig/addService.vue
src/views/serviceConfig/index.vue
src/api/modules/serviceConfig.js
View file @
dc154ed
import
{
http
}
from
'@/main'
import
{
http
}
from
'@/main'
const
CUR_BASE_URL
=
'rop-scrm-equity/router'
const
get4SList
=
params
=>
{
const
get4SList
=
params
=>
{
params
.
method
=
`scrm.api.carlife.merchant.listWithPageByCurMerchant`
params
.
method
=
`scrm.api.carlife.merchant.listWithPageByCurMerchant`
...
@@ -71,6 +72,56 @@ const getEquityDetail = params => {
...
@@ -71,6 +72,56 @@ const getEquityDetail = params => {
})
})
}
}
const
getServicesItemsList
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.items.pages`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
createCommonConfig
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.items.common.config.insert.or.update`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getCommonConfig
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.items.common.config.list`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
addServicesProject
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.items.insert.or.update`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getSpecificaListApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.items.grade.list`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
get4SList
,
get4SList
,
getEquityList
,
getEquityList
,
...
@@ -78,5 +129,10 @@ export default {
...
@@ -78,5 +129,10 @@ export default {
getServiceList
,
getServiceList
,
craeteEquity
,
craeteEquity
,
updateEquity
,
updateEquity
,
getEquityDetail
getEquityDetail
,
getServicesItemsList
,
createCommonConfig
,
getCommonConfig
,
addServicesProject
,
getSpecificaListApi
}
}
\ No newline at end of file
\ No newline at end of file
src/components/Editor/index.vue
View file @
dc154ed
...
@@ -2,11 +2,13 @@
...
@@ -2,11 +2,13 @@
<div
class=
"bar-content"
>
<div
class=
"bar-content"
>
<label
for=
""
class=
"content-label"
>
{{
label
}}
</label>
<label
for=
""
class=
"content-label"
>
{{
label
}}
</label>
<div
class=
"editor"
>
<div
class=
"editor"
>
<quill-editor
ref=
"myQuillEditor"
class=
"quill"
v-model=
"
content[key]"
:options=
"editorOption
"
></quill-editor>
<quill-editor
ref=
"myQuillEditor"
class=
"quill"
v-model=
"
obj[attr]"
:options=
"editorOption"
@
change=
"onEditorChange($event)
"
></quill-editor>
<div
class=
"extend-bar"
>
<div
class=
"extend-bar"
>
<i
class=
"el-icon-circle-plus extend-icon"
@
click=
"insertContent"
>
购买条件
</i>
<i
class=
"el-icon-circle-plus extend-icon"
@
click=
"insertContent"
>
购买条件
</i>
</div>
</div>
</div>
</div>
<el-input
type=
"text"
v-model=
"obj[attr]"
name=
""
id=
""
></el-input>
<button
@
click=
"sss"
>
ss
</button>
</div>
</div>
</
template
>
</
template
>
...
@@ -22,13 +24,10 @@ export default {
...
@@ -22,13 +24,10 @@ export default {
quillEditor
,
quillEditor
,
},
},
props
:
{
props
:
{
content
:
{
obj
:
{
type
:
Object
,
type
:
Object
default
:
()
=>
{
return
{}
},
},
},
key
:
{
attr
:
{
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
,
},
},
...
@@ -64,12 +63,18 @@ export default {
...
@@ -64,12 +63,18 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
insertContent
(){
insertContent
(){
let
quill
=
this
.
$refs
.
myQuillEditor
.
quill
;
let
quill
=
this
.
$refs
.
myQuillEditor
.
quill
;
let
length
=
quill
.
selection
.
savedRange
.
index
;
let
length
=
quill
.
selection
.
savedRange
.
index
;
quill
.
insertEmbed
(
length
,
'label'
,
132
);
quill
.
insertEmbed
(
length
,
'label'
,
132
);
quill
.
setSelection
(
length
+
1
);
quill
.
setSelection
(
length
+
1
);
}
},
onEditorChange
(
e
){
console
.
log
(
e
)
},
sss
(){
console
.
log
(
this
.
obj
)
}
}
}
}
}
</
script
>
</
script
>
...
...
src/components/Upload/index.vue
View file @
dc154ed
<
template
>
<
template
>
<div
class=
"upload-ctnr"
>
<div
class=
"upload-ctnr"
>
<label
v-if=
"name"
class=
"label"
for=
""
>
{{
name
}}
</label>
<label
v-if=
"name"
class=
"label"
for=
""
>
{{
name
}}
</label>
<div
:class=
"['upload-wrap']
"
:style=
"defaultStyle"
>
<div
class=
"upload-wrap
"
:style=
"defaultStyle"
>
<img
v-if=
"url"
class=
"image"
:src=
"url"
alt=
""
/>
<img
v-if=
"url"
class=
"image"
:src=
"url"
alt=
""
/>
<div
v-else
class=
"add-img"
>
<div
v-else
class=
"add-img"
>
<input
type=
"file"
class=
"file"
id=
"file"
ref=
"input"
@
change=
"upload"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
/>
<i
class=
"el-icon-plus add"
></i>
<i
class=
"el-icon-plus add"
></i>
<p>
上传照片
</p>
<p>
上传照片
</p>
</div>
</div>
<div
class=
"operate"
v-if=
"url"
>
<div
class=
"operate"
v-if=
"url"
>
<div
class=
"btn-wrap"
>
<div
class=
"btn-wrap"
>
<i
class=
"el-icon-view"
></i>
<i
class=
"el-icon-view"
></i>
<i
class=
"el-icon-delete"
></i>
<i
class=
"el-icon-delete"
@
click=
"del"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -29,7 +30,7 @@
...
@@ -29,7 +30,7 @@
type
:
String
,
type
:
String
,
default
:
'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png'
default
:
'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png'
},
},
key
:
{
attr
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
},
...
@@ -46,12 +47,28 @@
...
@@ -46,12 +47,28 @@
}
}
},
},
methods
:
{
methods
:
{
upload
(
e
)
{
const
file
=
e
.
target
.
files
[
0
]
const
reader
=
new
FileReader
()
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
event
=>
{
const
imgFile
=
event
.
target
.
result
const
arrBase64
=
imgFile
.
split
(
','
)
const
base64
=
file
.
name
.
split
(
'.'
).
pop
()
+
'@'
+
arrBase64
[
1
]
this
.
$apis
.
claims
.
uploadImgApi
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
this
.
$emit
(
'uploadSuccess'
,
{
attr
:
this
.
attr
,
url
:
res
})
})
}
},
del
(){
this
.
$emit
(
'delImage'
,
{
attr
:
this
.
attr
})
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.upload-ctnr
{
.upload-ctnr
{
display
:
flex
;
.label{
.label{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
top
;
vertical-align
:
top
;
...
@@ -66,7 +83,7 @@
...
@@ -66,7 +83,7 @@
.upload-wrap
{
.upload-wrap
{
display
:
inline-flex
;
display
:
inline-flex
;
border
:
1px
dashed
#00000026
;
border
:
1px
dashed
#00000026
;
//
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
104px
;
width
:
104px
;
height
:
104px
;
height
:
104px
;
background
:
#0000000
a
;
background
:
#0000000
a
;
...
@@ -92,6 +109,16 @@
...
@@ -92,6 +109,16 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
color
:
#666666
;
color
:
#666666
;
position
:
relative
;
.file{
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
1
;
position
:
absolute
;
opacity
:
0
;
}
.add
{
.add
{
font-size
:
18px
;
font-size
:
18px
;
}
}
...
...
src/config/index.js
View file @
dc154ed
...
@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
...
@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout })
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// return Promise.resolve(cfg)
// }
// }
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
' https://oss-config.
dev
.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config'
)
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
' https://oss-config.
test
.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config'
)
//return window.fetch('https://', {}).then(res => res.json())
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
}
}
...
...
src/views/ContractManager/addTmpl.vue
View file @
dc154ed
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
</div>
</div>
</FoldFrame>
</FoldFrame>
<FoldFrame
name=
"合同介绍区域"
>
<FoldFrame
name=
"合同介绍区域"
>
<Editor
label=
"标题和介绍:"
:
content=
"obj"
key
=
"content"
></Editor>
<Editor
label=
"标题和介绍:"
:
obj=
"obj"
attr
=
"content"
></Editor>
</FoldFrame>
</FoldFrame>
</div>
</div>
<div
class=
"preview-area"
>
<div
class=
"preview-area"
>
...
...
src/views/serviceConfig/addService.vue
View file @
dc154ed
This diff is collapsed.
Click to expand it.
src/views/serviceConfig/index.vue
View file @
dc154ed
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"find_wrap"
>
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"table-wrapper"
>
</div>
<div
class=
"table_wrapper"
>
<div
class=
"operate_wrap"
>
<div
class=
"operate_wrap"
>
<span
class=
"table_title"
>
配置列表
</span>
<span
class=
"table_title"
>
配置列表
</span>
<div
class=
"operate_btn"
>
<div
class=
"operate_btn"
>
...
@@ -12,12 +10,13 @@
...
@@ -12,12 +10,13 @@
</div>
</div>
</div>
</div>
<GLTable
ref=
"equityRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"equityRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"serviceContent"
slot-scope=
"scope"
>
<div
slot=
"statusSlot"
slot-scope=
"scope"
>
<div
v-html=
"scope.scope.serviceContent"
></div>
<span
class=
"statsu-circle"
:style=
"
{'background-color': scope.scope.serviceStatus == 0 ? '#FDB757' : '#2CCA74'}">
</span>
</div>
<span>
{{
scope
.
scope
.
serviceStatus
==
0
?
'待配置'
:
'已配置'
}}
</span>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
</div>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
</span>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
</span>
</GLTable>
</GLTable>
</div>
</div>
</div>
</div>
...
@@ -61,7 +60,7 @@
...
@@ -61,7 +60,7 @@
],
],
searchForm
:
{
searchForm
:
{
serviceName
:
''
,
serviceName
:
''
,
status
:
''
,
s
erviceS
tatus
:
''
,
createdDate
:
''
,
createdDate
:
''
,
updatedDate
:
''
updatedDate
:
''
},
},
...
@@ -69,14 +68,30 @@
...
@@ -69,14 +68,30 @@
searchFormData
:
[
searchFormData
:
[
{
{
label
:
'服务名称'
,
label
:
'服务名称'
,
name
:
'serv
e
iceName'
,
name
:
'serviceName'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
,
isClear
:
true
,
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
name
:
'status'
,
name
:
'serviceStatus'
,
type
:
'input'
,
type
:
'select'
,
optionList
:
[
{
id
:
''
,
label
:
'全部'
},
{
id
:
'0'
,
label
:
'待配置'
},
{
id
:
'1'
,
label
:
'已配置'
}
],
optionId
:
'id'
,
optionLabel
:
'label'
,
isClear
:
true
,
isClear
:
true
,
},
},
{
{
...
@@ -97,14 +112,14 @@
...
@@ -97,14 +112,14 @@
}
}
],
],
// 表格
// 表格
getListApi
:
this
.
$apis
.
serviceConfig
.
get
Equity
List
,
getListApi
:
this
.
$apis
.
serviceConfig
.
get
ServicesItems
List
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
true
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'服务编号'
,
label
:
'服务编号'
,
prop
:
's
no
'
,
prop
:
's
erviceCode
'
,
width
:
200
width
:
200
},
},
{
{
...
@@ -115,39 +130,38 @@
...
@@ -115,39 +130,38 @@
{
{
label
:
'可销售服务年限'
,
label
:
'可销售服务年限'
,
minWidth
:
280
,
minWidth
:
280
,
prop
:
'serviceContent'
,
prop
:
'serviceContent'
addHtml
:
'serviceContent'
},
},
{
{
label
:
'规格数量'
,
label
:
'规格数量'
,
minWidth
:
150
,
minWidth
:
150
,
prop
:
'
instruc
t'
prop
:
'
gradeCoun
t'
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createDate'
,
prop
:
'create
d
Date'
,
width
:
200
,
width
:
200
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
create
Date
?
dayjs
(
cellValue
.
create
Date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
return
cellValue
.
create
dDate
?
dayjs
(
cellValue
.
created
Date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
},
},
{
{
label
:
'更新时间'
,
label
:
'更新时间'
,
prop
:
'updateDate'
,
prop
:
'update
d
Date'
,
width
:
200
,
width
:
200
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
update
Date
?
dayjs
(
cellValue
.
update
Date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
return
cellValue
.
update
dDate
?
dayjs
(
cellValue
.
updated
Date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
minWidth
:
28
0
,
minWidth
:
15
0
,
prop
:
's
erviceContent
'
,
prop
:
's
tatus
'
,
addHtml
:
's
erviceConten
t'
addHtml
:
's
tatusSlo
t'
},
},
{
{
label
:
'操作人'
,
label
:
'操作人'
,
prop
:
'updateBy'
,
prop
:
'update
d
By'
,
width
:
140
width
:
140
}
}
]
]
...
@@ -163,12 +177,12 @@
...
@@ -163,12 +177,12 @@
getParams
()
{
getParams
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
?.
createdDate
?.
length
)
{
if
(
this
.
searchForm
?.
createdDate
?.
length
)
{
params
.
m
inCreateTime
=
new
Date
(
this
.
searchForm
.
createdDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
beg
inCreateTime
=
new
Date
(
this
.
searchForm
.
createdDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
max
CreateTime
=
new
Date
(
this
.
searchForm
.
createdDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
params
.
end
CreateTime
=
new
Date
(
this
.
searchForm
.
createdDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
}
if
(
this
.
searchForm
?.
updatedDate
?.
length
)
{
if
(
this
.
searchForm
?.
updatedDate
?.
length
)
{
params
.
m
inUpdateTime
=
new
Date
(
this
.
searchForm
.
updatedDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
beg
inUpdateTime
=
new
Date
(
this
.
searchForm
.
updatedDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
max
UpdateTime
=
new
Date
(
this
.
searchForm
.
updatedDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
params
.
end
UpdateTime
=
new
Date
(
this
.
searchForm
.
updatedDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
}
delete
params
.
createdDate
delete
params
.
createdDate
delete
params
.
updatedDate
delete
params
.
updatedDate
...
@@ -206,7 +220,7 @@
...
@@ -206,7 +220,7 @@
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{
serviceName
:
''
,
serviceName
:
''
,
status
:
''
,
s
erviceS
tatus
:
''
,
createdDate
:
''
,
createdDate
:
''
,
updatedDate
:
''
updatedDate
:
''
}
}
...
@@ -231,21 +245,18 @@
...
@@ -231,21 +245,18 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.find_wrap
{
.container
{
background
:
#ffffff
;
background-color
:
#ffffff
;
padding
:
20px
20px
2px
20px
;
padding
:
20px
;
.resetBtn
{
.statsu-circle{
background
:
#ffffff
;
display
:
inline-block
;
color
:
#5850ff
;
width
:
6px
;
border
:
1px
solid
#5850ff
;
height
:
6px
;
border-radius
:
50%
;
background-color
:
#FDB757
;
margin-right
:
8px
;
vertical-align
:
middle
;
}
}
.m-r-l-20
{
margin
:
0
20px
;
}
}
.table_wrapper
{
background
:
#ffffff
;
padding
:
0
20px
20px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
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