Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 f8706718
authored
Dec 11, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
ef316f80
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
14 deletions
src/api/modules/customerTransform.js
src/views/customerTransform/addCustomer.vue
src/views/customerTransform/addCustomerGroup.vue
src/views/customerTransform/components/basicInfo.vue
src/views/customerTransform/detailCustomer.vue
src/views/customerTransform/index.vue
src/api/modules/customerTransform.js
View file @
f870671
...
@@ -210,6 +210,15 @@ const getActivity = params => {
...
@@ -210,6 +210,15 @@ const getActivity = params => {
sign
:
true
sign
:
true
})
})
}
}
const
nameVaild
=
params
=>
{
params
.
method
=
'entmicro.api.one.template.name.valid'
return
http
({
url
:
URL
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
customerList
,
customerList
,
customerGroupList
,
customerGroupList
,
...
@@ -231,5 +240,6 @@ export default {
...
@@ -231,5 +240,6 @@ export default {
getCard
,
getCard
,
getCoupon
,
getCoupon
,
getPackage
,
getPackage
,
getActivity
getActivity
,
nameVaild
}
}
src/views/customerTransform/addCustomer.vue
View file @
f870671
...
@@ -282,7 +282,10 @@ export default {
...
@@ -282,7 +282,10 @@ export default {
addLoading
:
false
,
addLoading
:
false
,
eventBus
:
new
Vue
(),
eventBus
:
new
Vue
(),
basicForm
:
{
basicForm
:
{
condition
:
{}
selectType
:
1
,
condition
:
{
sex
:
''
}
},
},
basicRules
:
{
basicRules
:
{
userList
:
[
userList
:
[
...
...
src/views/customerTransform/addCustomerGroup.vue
View file @
f870671
...
@@ -169,6 +169,19 @@ export default {
...
@@ -169,6 +169,19 @@ export default {
}
}
}
}
}
}
const
nameVaild
=
(
rule
,
value
,
callback
)
=>
{
console
.
log
(
value
)
if
(
value
)
{
this
.
$apis
.
customerTransform
.
nameVaild
({
templateName
:
value
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
)
{
callback
(
new
Error
(
'群聊名称不可重复'
))
}
else
{
callback
()
}
})
}
}
return
{
return
{
addLoading
:
false
,
addLoading
:
false
,
eventBus
:
new
Vue
(),
eventBus
:
new
Vue
(),
...
@@ -178,7 +191,10 @@ export default {
...
@@ -178,7 +191,10 @@ export default {
// { required: true, message: '请选择群发账号', trigger: 'blur' },
// { required: true, message: '请选择群发账号', trigger: 'blur' },
{
validator
:
validatorUser
,
trigger
:
'change'
}
{
validator
:
validatorUser
,
trigger
:
'change'
}
],
],
massName
:
[{
required
:
true
,
message
:
'请输入群聊名称'
,
trigger
:
'blur'
}],
massName
:
[
{
required
:
true
,
message
:
'请输入群聊名称'
,
trigger
:
'blur'
},
{
validator
:
nameVaild
,
trigger
:
'blur'
}
],
attachmentList
:
[
attachmentList
:
[
// { required: true, message: '请输入入群欢迎语' },
// { required: true, message: '请输入入群欢迎语' },
{
validator
:
validatorAttachment
,
trigger
:
'change'
}
{
validator
:
validatorAttachment
,
trigger
:
'change'
}
...
...
src/views/customerTransform/components/basicInfo.vue
View file @
f870671
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<div
class=
"detail-label"
>
创建者:
</div>
<div
class=
"detail-label"
>
创建者:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
createdName
?
basicInfo
.
createdName
:
'-'
}}
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
createdName
?
basicInfo
.
createdName
:
'-'
}}
</div>
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-item"
v-show=
"form == 'customer'"
>
<div
class=
"detail-label"
>
群发类型:
</div>
<div
class=
"detail-label"
>
群发类型:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendType
==
1
?
'立即发送'
:
'定时发送'
}}
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendType
==
1
?
'立即发送'
:
'定时发送'
}}
</div>
</div>
</div>
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
<div
class=
"detail-label"
>
发送状态:
</div>
<div
class=
"detail-label"
>
发送状态:
</div>
<div
class=
"detail-value"
>
{{
STATUS_TYPE
[
basicInfo
.
status
]
}}
</div>
<div
class=
"detail-value"
>
{{
STATUS_TYPE
[
basicInfo
.
status
]
}}
</div>
</div>
</div>
<div
class=
"detail-item"
v-show=
"form == 'customer' && basicInfo.sendType == 2"
>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
发送时间:
</div>
<div
class=
"detail-label"
>
发送时间:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendTime
}}
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendTime
?
basicInfo
.
sendTime
:
'--'
}}
</div>
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
群发对象:
</div>
<div
class=
"detail-label"
>
群发对象:
</div>
...
@@ -93,6 +93,8 @@ const STATUS = {
...
@@ -93,6 +93,8 @@ const STATUS = {
'1'
:
'发送成功'
,
'1'
:
'发送成功'
,
'2'
:
'发送失败'
'2'
:
'发送失败'
}
}
import
*
as
dayjs
from
'dayjs'
import
Preview
from
'../components/preview.vue'
import
Preview
from
'../components/preview.vue'
export
default
{
export
default
{
name
:
'BasicInof'
,
name
:
'BasicInof'
,
...
@@ -117,6 +119,7 @@ export default {
...
@@ -117,6 +119,7 @@ export default {
this
.
$apis
.
customerTransform
.
customerDetail
({
id
}).
then
(
res
=>
{
this
.
$apis
.
customerTransform
.
customerDetail
({
id
}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
basicInfo
=
res
this
.
basicInfo
=
res
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const
previewList
=
res
.
attachmentList
.
map
(
item
=>
{
const
previewList
=
res
.
attachmentList
.
map
(
item
=>
{
if
(
item
.
attType
==
7
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
if
(
item
.
attType
==
7
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
return
item
return
item
...
...
src/views/customerTransform/detailCustomer.vue
View file @
f870671
...
@@ -318,6 +318,8 @@ export default {
...
@@ -318,6 +318,8 @@ export default {
}
}
.customer-table
{
.customer-table
{
display
:
flex
;
display
:
flex
;
margin-top
:
0
;
margin-left
:
10px
;
&.send
{
&.send
{
width
:
70px
;
width
:
70px
;
}
}
...
...
src/views/customerTransform/index.vue
View file @
f870671
...
@@ -125,14 +125,14 @@ export default {
...
@@ -125,14 +125,14 @@ export default {
label
:
'发送时间'
,
label
:
'发送时间'
,
prop
:
'sendTime'
,
prop
:
'sendTime'
,
width
:
160
,
width
:
160
,
line
:
2
,
line
:
2
formatter
:
cellValue
=>
{
//
formatter: cellValue => {
if
(
cellValue
.
sendTime
)
{
//
if (cellValue.sendTime) {
return
dayjs
(
cellValue
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
//
return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
}
else
{
//
} else {
return
''
//
return ''
}
//
}
}
//
}
},
},
{
{
label
:
'已发送员工'
,
label
:
'已发送员工'
,
...
@@ -185,6 +185,13 @@ export default {
...
@@ -185,6 +185,13 @@ export default {
prop
:
'sendTime'
,
prop
:
'sendTime'
,
width
:
150
,
width
:
150
,
line
:
2
line
:
2
// formatter: cellValue => {
// if (cellValue.sendTime) {
// return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
// } else {
// return ''
// }
// }
},
},
{
{
label
:
'已发送群主'
,
label
:
'已发送群主'
,
...
...
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