Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 5e7ffa2d
authored
May 24, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第一轮bug修复
1 parent
351de919
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
90 additions
and
57 deletions
src/api/modules/common.js
src/api/modules/expert.js
src/config/index.js
src/main.js
src/setup/qiankun.js
src/views/expert/components/activityModel.vue
src/views/expert/components/selectMember.vue
src/views/expert/components/tag-textarea.vue
src/views/expert/detail.vue
src/views/expert/index.vue
src/api/modules/common.js
View file @
5e7ffa2
import
{
http
}
from
'@/main'
import
{
http
,
http_common
}
from
'@/main'
const
defaultPath
=
'scrm.api.live.'
...
...
@@ -45,7 +45,7 @@ const getZoneList = params => {
const
pictureUpload
=
params
=>
{
params
.
method
=
'glsx.accounts.biz.common.pictureUpload'
return
http
({
return
http
_common
({
url
:
'/router?method=glsx.accounts.biz.common.pictureUpload'
,
method
:
'POST'
,
data
:
params
,
...
...
src/api/modules/expert.js
View file @
5e7ffa2
import
{
http
,
http_brand
}
from
'@/main'
import
{
http
,
http_brand
,
request_merchant
}
from
'@/main'
const
getExpertList
=
params
=>
{
params
.
method
=
'entmicro.api.operation.page'
...
...
@@ -13,10 +13,10 @@ const getExpertList = params => {
const
getDepartment
=
params
=>
{
params
.
method
=
'entmicro.api.department.listDepartmentTree'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
...
...
@@ -62,7 +62,7 @@ const expertDetail = params => {
const
getMenberType
=
params
=>
{
params
.
method
=
'merchants.api.menu.findAllDictData'
return
http
({
return
request_merchant
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
...
...
src/config/index.js
View file @
5e7ffa2
...
...
@@ -17,12 +17,12 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
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())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
' https://oss-config.
dev
.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config'
)
//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' })
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
vue
.
prototype
.
$config
=
cfg
}
}
\ No newline at end of file
}
src/main.js
View file @
5e7ffa2
...
...
@@ -19,3 +19,5 @@ start()
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http_brand
=
params
=>
Vue
.
prototype
.
$http_brand
(
params
)
export
const
http_common
=
params
=>
Vue
.
prototype
.
$http_common
(
params
)
export
const
request_merchant
=
params
=>
Vue
.
prototype
.
$request_merchant
(
params
)
src/setup/qiankun.js
View file @
5e7ffa2
import
Vue
from
'vue'
import
ElementUI
from
'element-ui'
import
{
message
,
messageBox
}
from
'@/plugins/element.js'
import
{
fetchConfig
}
from
'@/config'
import
{
GLButton
,
GLTable
}
from
'glsx-components'
//权限按钮 (根据权限动态创建)
...
...
@@ -10,13 +11,14 @@ let routes = []
let
router
=
null
let
instance
=
null
Vue
.
use
(
GLTable
)
Vue
.
use
(
ElementUI
)
// Vue.use(Table)
// Vue.use(TableColumn)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
request_brand
,
sign
,
secret
}
=
await
fetchConfig
()
const
{
response
,
request
,
request_brand
,
request_common
,
request_merchant
,
sign_common
,
sign
,
secret
}
=
await
fetchConfig
()
// 本地切换域名,不需要Mock上面改动 const => let
// request.baseURL = 'https://scrm.
test
.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.
test
.glsx.com.cn'
// request.baseURL = 'https://scrm.
dev
.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.
dev
.glsx.com.cn'
// request.baseURL = 'http://192.168.1.78:8064'
// request_brand.baseURL = 'http://192.168.1.78:8064'
Vue
.
prototype
.
$history
=
history
...
...
@@ -28,8 +30,10 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue
.
prototype
.
$defaultStartDate
=
'2021-07-01'
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_brand
=
new
common
.
Http
({
response
,
request
:
request_brand
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-8e58ed43-8b98-43f1-932c-99ac788d426c-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-8e58ed43-8b98-43f1-932c-99ac788d426c-rop' } })
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$request_merchant
=
new
common
.
Http
({
response
,
request
:
request_merchant
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-c13d1275-bc81-4a5f-b909-72c60316945b-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-c13d1275-bc81-4a5f-b909-72c60316945b-rop' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
...
...
src/views/expert/components/activityModel.vue
View file @
5e7ffa2
...
...
@@ -5,11 +5,11 @@
<div
class=
"model-panel-tab"
>
<label>
活动类型:
</label>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
type=
"card"
>
<el-tab-pane
label=
"权益卡试用"
name=
"3"
></el-tab-pane>
<el-tab-pane
label=
"权益套餐"
name=
"4"
></el-tab-pane>
<el-tab-pane
label=
"商城券"
name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"秒杀活动"
name=
"5"
></el-tab-pane>
<el-tab-pane
label=
"无忧服务"
name=
"6"
v-if=
"openFlag"
></el-tab-pane>
<el-tab-pane
:disabled=
"disableChangeTab"
label=
"权益卡试用"
name=
"3"
></el-tab-pane>
<el-tab-pane
:disabled=
"disableChangeTab"
label=
"权益套餐"
name=
"4"
></el-tab-pane>
<el-tab-pane
:disabled=
"disableChangeTab"
label=
"商城券"
name=
"2"
></el-tab-pane>
<el-tab-pane
:disabled=
"disableChangeTab"
label=
"秒杀活动"
name=
"5"
></el-tab-pane>
<el-tab-pane
:disabled=
"disableChangeTab"
label=
"无忧服务"
name=
"6"
v-if=
"openFlag"
></el-tab-pane>
</el-tabs>
</div>
<div
class=
"model-item-panel"
v-if=
"modelList.length > 0"
v-loading=
"loading"
>
...
...
@@ -94,7 +94,8 @@ export default {
openFlag
:
0
,
selectItem
:
{
id
:
''
}
},
disableChangeTab
:
false
}
},
methods
:
{
...
...
@@ -180,6 +181,7 @@ export default {
if
(
this
.
activeName
==
6
)
{
params
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
}
this
.
disableChangeTab
=
true
this
.
$apis
.
customerTransform
[
market
](
params
)
.
then
(
res
=>
{
if
(
this
.
activeName
==
3
||
this
.
activeName
==
6
)
{
...
...
@@ -189,9 +191,11 @@ export default {
this
.
tableTotal
=
res
.
total
}
this
.
loading
=
false
this
.
disableChangeTab
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
this
.
disableChangeTab
=
false
})
},
merchantOpen
()
{
...
...
src/views/expert/components/selectMember.vue
View file @
5e7ffa2
...
...
@@ -19,7 +19,7 @@
<!--
<el-form-item>
<el-checkbox
v-model=
"searchForm.checked"
>
仅看跟进专员
</el-checkbox>
</el-form-item>
-->
<el-form-item
style=
"margin-bottom: 0;"
>
<el-form-item
style=
"margin-bottom: 0;
margin-top: 1px;
"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"search"
>
查询
</el-button>
</el-form-item>
</el-form>
...
...
@@ -36,10 +36,10 @@
</div>
</div>
<div
class=
"member-checked"
>
<
span
class=
"name"
>
<
div
class=
"name"
>
已选择:
{{
selectPerson
&&
selectPerson
.
staffName
}}
<span
v-if=
"selectPerson && selectPerson.staffTitle"
style=
"font-size:12px;"
>
|
{{
selectPerson
&&
selectPerson
.
staffTitle
}}
</span>
</
span
>
</
div
>
<el-checkbox
v-model=
"checked"
@
change=
"checkChange"
>
仅看跟进专员
</el-checkbox>
</div>
</div>
...
...
@@ -66,6 +66,7 @@ export default {
data
()
{
return
{
url
:
url
,
size
:
'small'
,
selectPerson
:
null
,
searchForm
:
{},
checked
:
''
,
...
...
@@ -307,7 +308,7 @@ export default {
height
:
32px
;
}
/
deep
/
.el-button--primary
{
padding
:
9
px
20px
;
padding
:
8
px
20px
;
}
}
.table-content
{
...
...
@@ -322,6 +323,8 @@ export default {
font-size
:
14px
;
margin-top
:
12px
;
.name
{
display
:
flex
;
align-items
:
center
;
color
:
#5850ff
;
}
/
deep
/
.el-checkbox__label
{
...
...
src/views/expert/components/tag-textarea.vue
View file @
5e7ffa2
...
...
@@ -128,18 +128,6 @@ export default {
// span.setAttribute('style', '-webkit-user-modify: read-only !important;')
let
text
=
'<br>车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
span
.
innerHTML
=
text
// console.log(textarea[0].childNodes, textarea[0]?.childNodes?.length)
// let pnode = document.createElement('span')
// let arr = ['车主朋友,您好!\n我是您的福利官,欢迎您领取电子质保卡,\n请点击下方链接进行领取及查看:\n', 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/', '\n祝您用车愉快!\n']
// if (textarea[0]?.childNodes?.length && (textarea[0]?.childNodes?.length != 1 || textarea[0]?.childNodes[0]?.nodeName != 'BR')) {
// arr[0] = '\n' + arr[0]
// }
// arr.forEach((item, index) => {
// let node = document.createElement('span')
// node.innerText = item
// if (index == 1) node.setAttribute('style', 'color:#409eff;')
// pnode.appendChild(node)
// })
this
.
insertNode
(
span
)
},
addNode
()
{
...
...
@@ -382,7 +370,9 @@ $textColor: #666;
position
:
relative
;
&_input
{
width
:
100%
;
min-height
:
200px
;
height
:
200px
;
max-height
:
320px
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
padding
:
10px
;
line-height
:
1.5
;
...
...
src/views/expert/detail.vue
View file @
5e7ffa2
...
...
@@ -5,9 +5,9 @@
<span
class=
"tip"
>
该配置页面用于配置「精品升级」小程序质保卡客户拉新,配置订单类型后,客户扫码质保卡活码即可添加员工企微号。
</span>
</div>
<div
class=
"detail-wrap"
>
<el-form
class=
"form"
ref=
"form"
:model=
"basicForm"
label-width=
"1
28
px"
>
<el-form
class=
"form"
ref=
"form"
:model=
"basicForm"
label-width=
"1
12
px"
>
<el-form-item
label=
"客户类型:"
>
<span
class=
"client"
>
{{
clientType
==
1
?
'升级客户'
:
'战败客户'
}}
</span>
<span
class=
"client"
>
{{
clientType
}}
</span>
</el-form-item>
<el-form-item
required
label=
"轻改专家:"
>
<span
v-if=
"selectPerson && selectPerson.staffName"
class=
"tag-info"
>
...
...
@@ -15,7 +15,7 @@
<span
class=
"client name"
>
{{
selectPerson
&&
selectPerson
.
staffName
}}
</span>
<i
class=
"el-icon-close del"
@
click=
"delPerson"
></i>
</span>
<el-button
v-else
size=
"small"
icon=
"el-icon-plus"
@
click=
"openMembers"
>
<el-button
class=
"checkNumber"
v-else
size=
"small"
icon=
"el-icon-plus"
@
click=
"openMembers"
>
选择成员
</el-button>
<span
v-if=
"selectPerson && selectPerson.departmentName"
class=
"depart-name"
>
{{
selectPerson
&&
selectPerson
.
departmentName
}}
</span>
...
...
@@ -27,7 +27,7 @@
<p>
当「精品升级」小程序提交升级订单时,
</p>
<p>
客户扫描订单质保码添加
<span
style=
"color:#409eff"
>
{{
(
selectPerson
&&
selectPerson
.
staffName
)
||
'待选择'
}}
</span>
<span
style=
"color:#409eff"
>
{{
' '
}}
{{
(
selectPerson
&&
selectPerson
.
staffName
)
||
'待选择'
}}
</span>
,
</p>
<p>
客户添加成功自动推送欢迎语,建议插入质保链接。
</p>
...
...
@@ -63,7 +63,7 @@ export default {
return
{
size
:
'small'
,
eventBus
:
new
Vue
(),
clientType
:
1
,
clientType
:
'升级客户'
,
expertId
:
''
,
btnList
:
[
{
...
...
@@ -91,42 +91,60 @@ export default {
name
:
'活动'
,
type
:
'acivity'
,
funName
:
'activity'
}
,
}
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// },
{
id
:
6
,
name
:
'插入质保链接'
,
type
:
'link'
,
funName
:
'link'
}
//
{
//
id: 6,
//
name: '插入质保链接',
//
type: 'link',
//
funName: 'link'
//
}
],
membersVisible
:
false
,
selectData
:
[],
basicForm
:
{},
selectPerson
:
null
selectPerson
:
null
,
numberTypeList
:
[]
}
},
mounted
()
{
const
urlParam
=
this
.
$route
.
params
let
param
=
JSON
.
parse
(
urlParam
.
id
)
this
.
clientType
=
param
.
clientType
if
(
this
.
clientType
==
'升级客户'
)
{
let
obj
=
{
id
:
6
,
name
:
'插入质保链接'
,
type
:
'link'
,
funName
:
'link'
}
this
.
btnList
.
push
(
obj
)
}
if
(
param
.
expertId
)
{
this
.
expertId
=
param
.
expertId
this
.
getDetail
(
param
.
expertId
)
}
this
.
getTypeList
()
},
methods
:
{
getTypeList
()
{
this
.
$apis
.
expert
.
getMenberType
({
dictType
:
'operation_type'
}).
then
(
res
=>
{
if
(
res
)
{
this
.
numberTypeList
=
res
}
})
},
getDetail
(
id
)
{
this
.
$apis
.
expert
.
expertDetail
({
id
}).
then
(
res
=>
{
if
(
res
?.
id
)
{
this
.
selectPerson
=
res
this
.
$refs
.
welcome
.
setDetail
(
res
.
welcomeInfo
)
this
.
clientType
=
res
.
businessTypeName
}
})
},
...
...
@@ -167,8 +185,11 @@ export default {
item
.
attContent
=
JSON
.
stringify
(
item
.
attContent
)
}
})
const
targetItem
=
this
.
numberTypeList
.
find
(
item
=>
{
return
item
.
dictLabel
==
this
.
clientType
})
let
params
=
{
businessType
:
t
his
.
clientTyp
e
,
businessType
:
t
argetItem
.
dictValu
e
,
staffId
:
this
.
selectPerson
.
staffId
,
// welcomeInfo: this.$refs.welcome.previewList
welcomeInfo
:
preList
...
...
@@ -200,14 +221,20 @@ export default {
background-color
:
#fff
;
min-height
:
calc
(
100vh
-
144px
);
margin-bottom
:
64px
;
.checkNumber
{
padding
:
8px
12px
;
}
.numberDialog
{
/deep/
.el-dialog__header
{
height
:
56px
;
padding
:
0
2
4
px
;
padding
:
0
2
0
px
;
line-height
:
56px
;
font-size
:
18px
;
font-weight
:
600
;
color
:
#000000
;
.el-dialog__headerbtn
{
top
:
17px
;
}
}
/
deep
/
.el-dialog__body
{
padding-top
:
0
;
...
...
@@ -239,7 +266,7 @@ export default {
}
}
.detail-wrap
{
padding
:
40px
;
padding
:
40px
20px
;
.client
{
color
:
#333
;
}
...
...
@@ -273,6 +300,9 @@ export default {
}
.form
{
/deep/.el-form-item
{
height
:
36px
;
line-height
:
36px
;
margin-bottom
:
20px
;
&
>
.el-form-item__label
{
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
...
...
src/views/expert/index.vue
View file @
5e7ffa2
This diff is collapsed.
Click to expand it.
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